From: Serhiy Storchaka Date: Sat, 12 Nov 2016 20:47:16 +0000 (+0200) Subject: Fixed the documentation of parse_constant argument in json.load(). X-Git-Tag: v3.6.0b4~96^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=022371ff945a4d0012cdcdc209031a132e43a5c9;p=python 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. --- diff --git a/Doc/library/json.rst b/Doc/library/json.rst index c1a52a79ea..858a59e3c5 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -332,8 +332,8 @@ Encoders and Decoders (e.g. :class:`float`). *parse_constant*, if specified, will be called with one of the following - strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``, ``'null'``, ``'true'``, - ``'false'``. This can be used to raise an exception if invalid JSON numbers + strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``. + This can be used to raise an exception if invalid JSON numbers are encountered. If *strict* is false (``True`` is the default), then control characters diff --git a/Lib/json/__init__.py b/Lib/json/__init__.py index f72b058123..1118b0eb99 100644 --- a/Lib/json/__init__.py +++ b/Lib/json/__init__.py @@ -297,7 +297,7 @@ def loads(s, encoding=None, cls=None, object_hook=None, parse_float=None, for JSON integers (e.g. float). ``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 are encountered.