Skip to content

Commit 022371f

Browse files
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.
1 parent 6b4b6e9 commit 022371f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Doc/library/json.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ Encoders and Decoders
332332
(e.g. :class:`float`).
333333

334334
*parse_constant*, if specified, will be called with one of the following
335-
strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``, ``'null'``, ``'true'``,
336-
``'false'``. This can be used to raise an exception if invalid JSON numbers
335+
strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``.
336+
This can be used to raise an exception if invalid JSON numbers
337337
are encountered.
338338

339339
If *strict* is false (``True`` is the default), then control characters

Lib/json/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def loads(s, encoding=None, cls=None, object_hook=None, parse_float=None,
297297
for JSON integers (e.g. float).
298298
299299
``parse_constant``, if specified, will be called with one of the
300-
following strings: -Infinity, Infinity, NaN, null, true, false.
300+
following strings: -Infinity, Infinity, NaN.
301301
This can be used to raise an exception if invalid JSON numbers
302302
are encountered.
303303

0 commit comments

Comments
 (0)