PyDocs

Nav

Internet Data Handling

EmailPolicy.header_fetch_parse

  • EmailPolicy.header_fetch_parse(name, value)
Given the header name and the value from the model, return the value
to be returned to the application program that is requesting that
header.  The value passed in by the email package may contain
surrogateescaped binary data if the lines were parsed by a BytesParser.
The returned value should not contain any surrogateescaped data.

If the value has a 'name' attribute, it is returned to unmodified.
Otherwise the name and the value with any linesep characters removed
are passed to the header_factory method, and the resulting custom
header object is returned.  Any surrogateescaped bytes get turned
into the Unicode unknown-character glyph.
0 Examples
No examples for email.policy/EmailPolicy.header_fetch_parse.
See Also
No see-alsos for email.policy/EmailPolicy.header_fetch_parse
0 Notes
No notes for EmailPolicy.header_fetch_parse