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

Method fold

Lib/email/_policybase.py:336–344  ·  view source on GitHub ↗

+ Headers are folded using the Header folding algorithm, which preserves existing line breaks in the value, and wraps each resulting line to the max_line_length. Non-ASCII binary data are CTE encoded using the unknown-8bit charset.

(self, name, value)

Source from the content-addressed store, hash-verified

334 return self._sanitize_header(name, value)
335
336 def fold(self, name, value):
337 """+
338 Headers are folded using the Header folding algorithm, which preserves
339 existing line breaks in the value, and wraps each resulting line to the
340 max_line_length. Non-ASCII binary data are CTE encoded using the
341 unknown-8bit charset.
342
343 """
344 return self._fold(name, value, sanitize=True)
345
346 def fold_binary(self, name, value):
347 """+

Callers

nothing calls this directly

Calls 1

_foldMethod · 0.95

Tested by

no test coverage detected