PyDocs

Nav

Internet Data Handling

BaseHeader.fold

  • BaseHeader.fold(*, policy)
Fold header according to policy.

The parsed representation of the header is folded according to
RFC5322 rules, as modified by the policy.  If the parse tree
contains surrogateescaped bytes, the bytes are CTE encoded using
the charset 'unknown-8bit".

Any non-ASCII characters in the parse tree are CTE encoded using
charset utf-8. XXX: make this a policy setting.

The returned value is an ASCII-only string possibly containing linesep
characters, and ending with a linesep character.  The string includes
the header name and the ': ' separator.
0 Examples
No examples for email.headerregistry/BaseHeader.fold.
See Also
No see-alsos for email.headerregistry/BaseHeader.fold
0 Notes
No notes for BaseHeader.fold