[issue4136] merge json library with latest simplejson 2.0.x
Martin v. Löwis
report at bugs.python.org
Sat Feb 28 10:28:15 CET 2009
Martin v. Löwis <martin at v.loewis.de> added the comment:
The one thing that IMO needs to be decided before this can be accept is
the version compatibility: what Python versions must this code stay
compatible with? That decision then needs to be implemented.
Apart from this (and the additional minor comments below), the patch
looks fine.
http://codereview.appspot.com/20095/diff/1/13
File Lib/json/decoder.py (right):
http://codereview.appspot.com/20095/diff/1/13#newcode21
Line 21: nan, inf = struct.unpack('dd', _BYTES)
I think this can be simplified as
nan, inf = struct.unpack('>dd', _BYTES)
http://codereview.appspot.com/20095/diff/1/12
File Lib/json/encoder.py (right):
http://codereview.appspot.com/20095/diff/1/12#newcode31
Line 31: INFINITY = float('1e66666')
Why not decoder.PosInf?
http://codereview.appspot.com/20095/diff/1/14
File Modules/_json.c (right):
http://codereview.appspot.com/20095/diff/1/14#newcode3
Line 3: #if PY_VERSION_HEX < 0x02060000 && !defined(Py_TYPE)
Is Python before 2.6 even supported anymore? ISTM that the usage of
.format on strings outrules Python2.5 and earlier.
http://codereview.appspot.com/20095
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4136>
_______________________________________
More information about the Python-bugs-list
mailing list