[docs] [issue14692] json.joads parse_constant callback not working anymore

Hynek Schlawack report at bugs.python.org
Sun Apr 29 13:25:05 CEST 2012


Hynek Schlawack <hs at ox.cx> added the comment:

Hi Jakob,

parse_constant has been changed as of d95e5add3ca4 to be called only on "-Infinity, Infinity, NaN":

        ``parse_constant``, if specified, will be called with one of the
        following strings: -Infinity, Infinity, NaN.
        This can be used to raise an exception if invalid JSON numbers
        are encountered.

And indeed, if you change your example to Infinity, it gets called.

That said, neither the 2.7 nor the dev docs reflect that. So it seems like a documentation bug to me.

----------
assignee:  -> docs at python
components: +Documentation -Extension Modules
nosy: +docs at python, eric.araujo, georg.brandl, hynek
versions: +Python 3.2, Python 3.3

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


More information about the docs mailing list