Performs postorder iteration over tree.
This is somewhat inelegant compared to saving the node and its index on the stack, but is 30% faster in the average case and 3x faster in the worst case (for a comb tree).
Parameters: | include_self : bool
|
---|---|
Returns: | GeneratorType
|
See also
traverse, preorder, pre_and_postorder, levelorder, tips, non_tips
Examples
>>> from six import StringIO
>>> from skbio import TreeNode
>>> tree = TreeNode.read(StringIO("((a,b)c);"))
>>> for node in tree.postorder():
... print(node.name)
a
b
c
None