summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-12 20:48:50 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-12 20:48:50 (GMT)
commita8f2f5ab0d40d654946a2988e0c8d390bcf790a5 (patch)
treea167d888d0f5d5725228226b904ffeaca88526cc
parent616034eb736e9d1b45eefa2387b55a223d3bb0fd (diff)
parent58d3e54556a97c92ea8720691f534f71281c9f2c (diff)
downloadcpython-a8f2f5ab0d40d654946a2988e0c8d390bcf790a5.zip
cpython-a8f2f5ab0d40d654946a2988e0c8d390bcf790a5.tar.gz
cpython-a8f2f5ab0d40d654946a2988e0c8d390bcf790a5.tar.bz2
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.
-rw-r--r--Doc/library/json.rst4
-rw-r--r--Lib/json/__init__.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
index 033e3fc..200fa14 100644
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -339,8 +339,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 94397aa..b8d5e6c 100644
--- a/Lib/json/__init__.py
+++ b/Lib/json/__init__.py
@@ -328,7 +328,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.