py: Add hex builtin function.

A one-liner, added especially for @pfalcon :)
This commit is contained in:
Damien George
2014-04-15 12:42:52 +01:00
parent 256b319d56
commit 5805111732
5 changed files with 11 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ codepoint2name[ord('-')] = 'hyphen';
codepoint2name[ord('.')] = 'dot'
codepoint2name[ord(':')] = 'colon'
codepoint2name[ord('/')] = 'slash'
codepoint2name[ord('%')] = 'percent'
# this must match the equivalent function in qstr.c
def compute_hash(qstr):