Attempts to call all_nodes_iter() raise AttributeError
Recommend creating an alias so that Tree.all_nodes_iter and Tree.all_nodes_itr are references to the same function object.
Inside the tree class just write all_nodes_itr = all_nodes_iter
An alias is a better solution than correcting the documentation, because -- I assure you -- users will sometimes type "iter," out of habit, instead of writing "itr." You can prevent alot of interpreter errors from occurring by making an alias.
The documentation says the tree class has a method named
tree.all_nodes_iter()
, but the method name is actuallyitr
without ane
http://treelib.readthedocs.io/en/latest/pyapi.html#tree-objects http://treelib.readthedocs.io/en/latest/pyapi.html#tree.all_nodes_iter
Attempts to call
all_nodes_iter()
raiseAttributeError
Recommend creating an alias so thatTree.all_nodes_iter
andTree.all_nodes_itr
are references to the same function object.Inside the tree class just write
all_nodes_itr = all_nodes_iter
An alias is a better solution than correcting the documentation, because -- I assure you -- users will sometimes type "iter," out of habit, instead of writing "itr." You can prevent alot of interpreter errors from occurring by making an alias.