Commit 2153c919 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Fixed the documentation of parse_constant argument in json.load().

parse_constant doesn't get called on 'null', 'true', 'false' since 3.1/2.7.
parent 827a1e26
...@@ -332,8 +332,8 @@ Encoders and Decoders ...@@ -332,8 +332,8 @@ Encoders and Decoders
(e.g. :class:`float`). (e.g. :class:`float`).
*parse_constant*, if specified, will be called with one of the following *parse_constant*, if specified, will be called with one of the following
strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``, ``'null'``, ``'true'``, strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``.
``'false'``. This can be used to raise an exception if invalid JSON numbers This can be used to raise an exception if invalid JSON numbers
are encountered. are encountered.
If *strict* is false (``True`` is the default), then control characters If *strict* is false (``True`` is the default), then control characters
......
...@@ -297,7 +297,7 @@ def loads(s, encoding=None, cls=None, object_hook=None, parse_float=None, ...@@ -297,7 +297,7 @@ def loads(s, encoding=None, cls=None, object_hook=None, parse_float=None,
for JSON integers (e.g. float). for JSON integers (e.g. float).
``parse_constant``, if specified, will be called with one of the ``parse_constant``, if specified, will be called with one of the
following strings: -Infinity, Infinity, NaN, null, true, false. following strings: -Infinity, Infinity, NaN.
This can be used to raise an exception if invalid JSON numbers This can be used to raise an exception if invalid JSON numbers
are encountered. are encountered.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment