8000 Better handling of null/None in our simplejson. · awesome-python/html5lib-python@9460bc9 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 9460bc9

Browse files
committed
Better handling of null/None in our simplejson.
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40765
1 parent 33aebe8 commit 9460bc9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/support.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
import re
2727
class simplejson:
2828
def load(f):
29-
true, false = True, False
29+
true, false, null = True, False, None
3030
input = re.sub(r'(".*?(?<!\\)")',r'u\1',f.read().decode('utf-8'))
31-
input = input.replace('null', 'None')
3231
return eval(input.replace('\r',''))
3332
load = staticmethod(load)
3433

0 commit comments

Comments
 (0)
0