def __iter__(self):
        """The standard preorder traversal of a binary tree."""
        if self:
            yield self.cargo
            for elem in self.left:
                yield elem
            for elem in self.right:
                yield elem
The standard preorder traversal of a binary tree.
recipes/Python/136529_Trees_and_more_trees/recipe-136529.py