[issue4136] merge json library with latest simplejson 2.0.x

Antoine Pitrou report at bugs.python.org
Mon Feb 16 13:40:43 CET 2009


Antoine Pitrou <pitrou at free.fr> added the comment:

A bunch of comments from a quick look:

- why do you use old-style relative imports ("from decoder import
JSONDecoder")?
- in join_list_unicode, join_list_string you could use PyUnicode_Join
and _PyString_Join, respectively
- in scanstring_unicode, the top comment says "encoding is the encoding
of pystr (must be an ASCII superset)", but the function takes no
"encoding" parameter
- there are some lines much longer than 80 chars (it's quite clear when
reading the diff)
- there are places where you call PyObject_IsTrue(s->strict) without
checking for an error return; perhaps you could do so in the constructor
- the Scanner type doesn't support cyclic garbage collection, but it
contains some arbitrary Python objects (parse_constant and friends could
be closures or methods)
- same issue with the Encoder type (default_fn could hold arbitrary
objects alive)

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4136>
_______________________________________


More information about the Python-bugs-list mailing list