#NEWLINE# def _traverse( self ) : #NEWLINE# #INDENT# ' Traverse over tree, yielding all subtrees and leaves ' #NEWLINE# ( yield self ) #NEWLINE# traversals = ( ( arg . _traverse ( ) if isinstance ( arg , Node ) else [ arg ] ) for arg in self . _args ) #NEWLINE# for trav in traversals : #NEWLINE# #INDENT# for item in trav : #NEWLINE# #INDENT# ( yield item )