MCPcopy Index your code
hub / github.com/python/cpython / walk

Function walk

Lib/email/iterators.py:19–28  ·  view source on GitHub ↗

Walk over the message tree, yielding each subpart. The walk is performed in depth-first order. This method is a generator.

(self)

Source from the content-addressed store, hash-verified

17
18# This function will become a method of the Message class
19def 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.

Callers

nothing calls this directly

Calls 3

is_multipartMethod · 0.80
get_payloadMethod · 0.80
walkMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…