py: Add builtin functions bin and oct, and some tests for them.

This commit is contained in:
Damien George
2014-04-15 22:03:55 +01:00
parent d5323f07ff
commit 897fe0c0d0
10 changed files with 64 additions and 2 deletions

View File

@@ -18,6 +18,8 @@ codepoint2name[ord(':')] = 'colon'
codepoint2name[ord('/')] = 'slash'
codepoint2name[ord('%')] = 'percent'
codepoint2name[ord('#')] = 'hash'
codepoint2name[ord('{')] = 'brace_open'
codepoint2name[ord('}')] = 'brace_close'
# this must match the equivalent function in qstr.c
def compute_hash(qstr):