MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / quote

Function quote

tools/python-3.11.9-amd64/Lib/quopri.py:36–40  ·  view source on GitHub ↗

Quote a single character.

(c)

Source from the content-addressed store, hash-verified

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

Callers 2

writeFunction · 0.70
encodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected