def __iter__(self, func=lambda lst, tail: lst + tail):
        '''
        this generator  will iterate  through the tree  (left-to-right
        depth-first).
        func : a function taking two parameters, the first is the list
               of sub-nodes  of the  current node,  the second  is the 
               stack representing the tail  of the returning node list 
               (excluding  the   returned  nodes).   And  returning  a 
               combined list of nodes.
        '''
        node_list = [self]
        while 1:
            try:
                cur = node_list.pop(0)
                node_list = func(cur.__leafs, node_list)
                yield cur
            except AttributeError:
                yield cur
            except IndexError:
                return

        this generator  will iterate  through the tree  (left-to-right
        depth-first).
        func : a function taking two parameters, the first is the list
               of sub-nodes  of the  current node,  the second  is the 
               stack representing the tail  of the returning node list 
               (excluding  the   returned  nodes).   And  returning  a 
               combined list of nodes.
        
recipes/Python/173217_A_fun_litle_tree_class/recipe-173217.py