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

Function _structure

Lib/email/iterators.py:56–68  ·  view source on GitHub ↗

A handy debugging aid

(msg, fp=None, level=0, include_default=False)

Source from the content-addressed store, hash-verified

54
55
56def _structure(msg, fp=None, level=0, include_default=False):
57 """A handy debugging aid"""
58 if fp is None:
59 fp = sys.stdout
60 tab = ' ' * (level * 4)
61 print(tab + msg.get_content_type(), end='', file=fp)
62 if include_default:
63 print(' [%s]' % msg.get_default_type(), file=fp)
64 else:
65 print(file=fp)
66 if msg.is_multipart():
67 for subpart in msg.get_payload():
68 _structure(subpart, fp, level+1, include_default)

Callers 1

test_mondo_messageMethod · 0.90

Calls 4

get_content_typeMethod · 0.80
get_default_typeMethod · 0.80
is_multipartMethod · 0.80
get_payloadMethod · 0.80

Tested by 1

test_mondo_messageMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…