Skip to content

Commit 58b6b98

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 fed0883 commit 58b6b98

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎Doc/library/json.rst‎

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

346346
*parse_constant*, if specified, will be called with one of the following
347-
strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``, ``'null'``, ``'true'``,
348-
``'false'``. This can be used to raise an exception if invalid JSON numbers
347+
strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``.
348+
This can be used to raise an exception if invalid JSON numbers
349349
are encountered.
350350

351351
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
@@ -325,7 +325,7 @@ def loads(s, encoding=None, cls=None, object_hook=None, parse_float=None,
325325
for JSON integers (e.g. float).
326326
327327
``parse_constant``, if specified, will be called with one of the
328-
following strings: -Infinity, Infinity, NaN, null, true, false.
328+
following strings: -Infinity, Infinity, NaN.
329329
This can be used to raise an exception if invalid JSON numbers
330330
are encountered.
331331

0 commit comments

Comments
 (0)