MCPcopy Index your code
hub / github.com/RustPython/RustPython / _dispatch

Method _dispatch

Lib/email/generator.py:494–512  ·  view source on GitHub ↗
(self, msg)

Source from the content-addressed store, hash-verified

492 self._fmt = fmt
493
494 def _dispatch(self, msg):
495 for part in msg.walk():
496 maintype = part.get_content_maintype()
497 if maintype == 'text':
498 print(part.get_payload(decode=False), file=self)
499 elif maintype == 'multipart':
500 # Just skip this
501 pass
502 else:
503 print(self._fmt % {
504 'type' : part.get_content_type(),
505 'maintype' : part.get_content_maintype(),
506 'subtype' : part.get_content_subtype(),
507 'filename' : part.get_filename('[no filename]'),
508 'description': part.get('Content-Description',
509 '[no description]'),
510 'encoding' : part.get('Content-Transfer-Encoding',
511 '[no encoding]'),
512 }, file=self)
513
514
515# Helper used by Generator._make_boundary

Callers

nothing calls this directly

Calls 8

get_content_maintypeMethod · 0.80
get_payloadMethod · 0.80
get_content_typeMethod · 0.80
get_content_subtypeMethod · 0.80
printFunction · 0.50
walkMethod · 0.45
get_filenameMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected