Open cowo78 opened 5 years ago
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).
In case creating a list like Tree.children() does is too heavy for efficiency reasons.