Tutorials
Library walkthrough
Reference documentation
traverse_tree_backward()
Traverse a tree of nodes in a backwards fashion.
leaves (Sequence[Node]) – The leaves of the tree to traverse.
func (Callable[[Node], Any]) – The function to apply to each node in the tree. Note that you can raise a StopTraverse exception to stop the traversal of the tree for any reason.