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

Function ishex

Lib/quopri.py:165–168  ·  view source on GitHub ↗

Return true if the byte ordinal 'c' is a hexadecimal digit in ASCII.

(c)

Source from the content-addressed store, hash-verified

163
164# Other helper functions
165def ishex(c):
166 """Return true if the byte ordinal 'c' is a hexadecimal digit in ASCII."""
167 assert isinstance(c, bytes)
168 return b'0' <= c <= b'9' or b'a' <= c <= b'f' or b'A' <= c <= b'F'
169
170def unhex(s):
171 """Get the integer value of a hexadecimal number."""

Callers 1

decodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…