[Python-checkins] cpython (merge 3.6 -> default): Fixed the documentation of parse_constant argument in json.load().
serhiy.storchaka
python-checkins at python.org
Sat Nov 12 15:49:06 EST 2016
https://hg.python.org/cpython/rev/c674dade719f
changeset: 105076:c674dade719f
parent: 105072:0b576ab589c5
parent: 105075:51a9c1c9272c
user: Serhiy Storchaka <storchaka at gmail.com>
date: Sat Nov 12 22:48:50 2016 +0200
summary:
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.
files:
Doc/library/json.rst | 4 ++--
Lib/json/__init__.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -339,8 +339,8 @@
(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
--- a/Lib/json/__init__.py
+++ b/Lib/json/__init__.py
@@ -328,7 +328,7 @@
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.
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list