Add docstring to hex_byte.

master
Ethan Dalool 2020-02-06 20:18:09 -08:00
parent 6cac1d5a25
commit 593ff020dc
1 changed files with 3 additions and 0 deletions

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')