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

Function quote

Lib/quopri.py:34–38  ·  view source on GitHub ↗

Quote a single character.

(c)

Source from the content-addressed store, hash-verified

32 return c == ESCAPE or not (b' ' <= c <= b'~')
33
34def quote(c):
35 """Quote a single character."""
36 assert isinstance(c, bytes) and len(c)==1
37 c = ord(c)
38 return ESCAPE + bytes((HEX[c//16], HEX[c%16]))
39
40
41

Callers 2

writeFunction · 0.70
encodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…