MCPcopy Index your code
hub / github.com/RustPython/RustPython / _toAscii

Method _toAscii

Lib/doctest.py:1698–1702  ·  view source on GitHub ↗

Convert string to hex-escaped ASCII string.

(self, s)

Source from the content-addressed store, hash-verified

1696 returns a string describing the differences between two outputs.
1697 """
1698 def _toAscii(self, s):
1699 """
1700 Convert string to hex-escaped ASCII string.
1701 """
1702 return str(s.encode('ASCII', 'backslashreplace'), "ASCII")
1703
1704 def check_output(self, want, got, optionflags):
1705 """

Callers 1

check_outputMethod · 0.95

Calls 2

strFunction · 0.85
encodeMethod · 0.45

Tested by

no test coverage detected