(self)
Walk over the message tree, yielding each subpart.

    The walk is performed in depth-first order.  This method is a
    generator.
Walk over the message tree, yielding each subpart.
Walk over the message tree yielding each subpart .
def walk(self):
    """Walk over the message tree, yielding each subpart.

    The walk is performed in depth-first order.  This method is a
    generator.
    """
    yield self
    if self.is_multipart():
        for subpart in self.get_payload():
            for subsubpart in subpart.walk():
                yield subsubpart
def walk ( self ) : yield self if self . is_multipart ( ) : for subpart in self . get_payload ( ) : for subsubpart in subpart . walk ( ) : yield subsubpart