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

Function message_from_bytes

Lib/email/__init__.py:39–45  ·  view source on GitHub ↗

Parse a bytes string into a Message object model. Optional _class and strict are passed to the Parser constructor.

(s, *args, **kws)

Source from the content-addressed store, hash-verified

37 return Parser(*args, **kws).parsestr(s)
38
39def message_from_bytes(s, *args, **kws):
40 """Parse a bytes string into a Message object model.
41
42 Optional _class and strict are passed to the Parser constructor.
43 """
44 from email.parser import BytesParser
45 return BytesParser(*args, **kws).parsebytes(s)
46
47def message_from_file(fp, *args, **kws):
48 """Read a file and parse its contents into a Message object model.

Callers

nothing calls this directly

Calls 2

BytesParserClass · 0.90
parsebytesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…