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

Function hexescape

Lib/test/test_urllib.py:30–35  ·  view source on GitHub ↗

Escape char as RFC 2396 specifies

(char)

Source from the content-addressed store, hash-verified

28
29
30def hexescape(char):
31 """Escape char as RFC 2396 specifies"""
32 hex_repr = hex(ord(char))[2:].upper()
33 if len(hex_repr) == 1:
34 hex_repr = "0%s" % hex_repr
35 return "%" + hex_repr
36
37
38def fakehttp(fakedata, mock_close=False):

Callers 5

test_default_quotingMethod · 0.85
test_quoting_spaceMethod · 0.85
test_unquotingMethod · 0.85
test_unquoting_partsMethod · 0.85
test_quotingMethod · 0.85

Calls 1

upperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…