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

Function message_from_string

Lib/email/__init__.py:31–37  ·  view source on GitHub ↗

Parse a 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

29# of importing email since those cascadingly import most of the rest of the
30# email package.
31def message_from_string(s, *args, **kws):
32 """Parse a string into a Message object model.
33
34 Optional _class and strict are passed to the Parser constructor.
35 """
36 from email.parser import Parser
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.

Calls 2

ParserClass · 0.90
parsestrMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…