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

Method _toAscii

Lib/doctest.py:1725–1729  ·  view source on GitHub ↗

Convert string to hex-escaped ASCII string.

(self, s)

Source from the content-addressed store, hash-verified

1723 returns a string describing the differences between two outputs.
1724 """
1725 def _toAscii(self, s):
1726 """
1727 Convert string to hex-escaped ASCII string.
1728 """
1729 return str(s.encode('ASCII', 'backslashreplace'), "ASCII")
1730
1731 def check_output(self, want, got, optionflags):
1732 """

Callers 1

check_outputMethod · 0.95

Calls 2

strFunction · 0.85
encodeMethod · 0.45

Tested by

no test coverage detected