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

Function hexstr

Lib/test/test_hashlib.py:71–77  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

69
70
71def hexstr(s):
72 assert isinstance(s, bytes), repr(s)
73 h = "0123456789abcdef"
74 r = ''
75 for i in s:
76 r += h[(i >> 4) & 0xF] + h[i & 0xF]
77 return r
78
79
80URL = "http://www.pythontest.net/hashlib/{}.txt"

Callers 1

test_hexdigestMethod · 0.85

Calls 2

isinstanceFunction · 0.85
reprFunction · 0.85

Tested by

no test coverage detected