Walk over the message tree, yielding each subpart. The walk is performed in depth-first order. This method is a generator.
(self)
| 17 | |
| 18 | # This function will become a method of the Message class |
| 19 | def walk(self): |
| 20 | """Walk over the message tree, yielding each subpart. |
| 21 | |
| 22 | The walk is performed in depth-first order. This method is a |
| 23 | generator. |
| 24 | """ |
| 25 | yield self |
| 26 | if self.is_multipart(): |
| 27 | for subpart in self.get_payload(): |
| 28 | yield from subpart.walk() |
| 29 | |
| 30 | |
| 31 | # These two functions are imported into the Iterators.py interface module. |
nothing calls this directly
no test coverage detected
searching dependent graphs…