Add docstring to hex_byte.

This commit is contained in:
Ethan Dalool 2020-02-06 20:18:09 -08:00
parent 6cac1d5a25
commit 593ff020dc

View file

@ -114,6 +114,9 @@ def update_filler(pairs, where_key):
return (qmarks, bindings)
def hex_byte(byte):
'''
Return the hex string for this byte. 00-ff.
'''
if byte not in range(0, 256):
raise ValueError(byte)
return hex(byte)[2:].rjust(2, '0')