On 01/19/2015 04:08 PM, Steven D'Aprano wrote: > Zachary Gilmartin wrote: > >> Why aren't there trees in the python standard library? > > Possibly because they aren't needed? Under what circumstances would you use > a tree instead of a list or a dict or combination of both? > > That's not a rhetorical question. I am genuinely curious, what task do you > have that you think must be solved by a tree? > > Also, what sort of tree? Binary tree? Binary search tree? Red/black tree? > AVL tree? Splay tree? B-tree? T-tree? Scapegoat tree? General n-ary tree? > Every possible type of tree yet invented?
Don't forget left-child,right-sibling trees. As I go through your list of trees, I can't find any tree type that cannot be easily and efficiently constructed with lists, possibly with dicts. -- https://mail.python.org/mailman/listinfo/python-list