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

Method _handle_text

Lib/email/generator.py:446–456  ·  view source on GitHub ↗
(self, msg)

Source from the content-addressed store, hash-verified

444 self.write(self._NL)
445
446 def _handle_text(self, msg):
447 # If the string has surrogates the original source was bytes, so
448 # just write it back out.
449 if msg._payload is None:
450 return
451 if _has_surrogates(msg._payload) and not self.policy.cte_type=='7bit':
452 if self._mangle_from_:
453 msg._payload = fcre.sub(">From ", msg._payload)
454 self._write_lines(msg._payload)
455 else:
456 super(BytesGenerator,self)._handle_text(msg)
457
458 # Default body handler
459 _writeBody = _handle_text

Callers

nothing calls this directly

Calls 5

_has_surrogatesFunction · 0.90
superClass · 0.85
_write_linesMethod · 0.80
subMethod · 0.45
_handle_textMethod · 0.45

Tested by

no test coverage detected