projects
/
github-barcamp-201407
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
import of github code used for the hackathon
[github-barcamp-201407]
/
ijson-1.1
/
ijson
/
compat.py
1
'''
2
Python2/Python3 compatibility utilities.
3
'''
4
5
import sys
6
7
8
IS_PY2 = sys.version_info[0] < 3
9
10
11
if IS_PY2:
12
b2s = lambda s: s
13
chr = unichr
14
else:
15
def b2s(b):
16
return b.decode('utf-8')
17
chr = chr
Benjamin Mako Hill
||
Want to submit a patch?