treelib
treelib copied to clipboard
New Tree.children_itr method
In case creating a list like Tree.children() does is too heavy for efficiency reasons.
It seems as duplicated as method children
which could convert into an iterator via iter(childrenI())
Not really. Doing an iter(children()) would first create a list then iterate over it while children_itr() would just create the iterator. In the first case memory usage is O(N), in the second is O(1).