treelib
treelib copied to clipboard
An efficient implementation of tree data structure in python 2/3.
* Having legacy ordering in the current form makes it impossible to print a tree without any ordering at all * Legacy ordering is invoked whenever ``key=None``, so it renders...
This is a proposed feature by Fahri Basegmez. I want to know if any others require this feature. I have a better implementation of a node ordering based on `data`...
Hi! Could you please give me an example of how to get the successors of a node 'a'? I'm not understanding what's the tree_id that is required to use this...
could we have this function
_[t.add_node(T.Node(identifier=r(), data=1), parent=t.all_nodes()[-1]) for i in range(1,10)]_ ``` > t.show() > 0 > └── 100 > ├── 4 > └── 20 > ├── 28 > ├── 77 > ├── 80...
Changed from `.../treelib/pull/` to `.../treelib/pulls`. Also added query tag for closed PR's on the Closed PR's badge.
Resolve #170 with `show(sorting=False)` to display the tree while maintaining insertion order. Signed-off-by: Hollow Man
filter, key, reverse, sorting To give users more flexibility. Signed-off-by: Hollow Man
From the code, it looks like the predecessor node function should be able to return None. But in the current implementation, it can't. https://github.com/caesar0301/treelib/blob/2d874516d986a937420215f58143e51d3f0893b5/treelib/node.py#L133