]> granicus.if.org Git - python/commitdiff
Fixed the documentation of parse_constant argument in json.load().
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 12 Nov 2016 20:47:16 +0000 (22:47 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Sat, 12 Nov 2016 20:47:16 +0000 (22:47 +0200)
parse_constant doesn't get called on 'null', 'true', 'false' since 3.1/2.7.

Doc/library/json.rst
Lib/json/__init__.py

index 9e3e05e93b712957c0e5be039120738740dd05e3..70defa24071efb00070db3510ce79c318949fb96 100644 (file)
@@ -344,8 +344,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
index a6ab7b2947be2280ba8af1cec66a1d41a6877303..d1be041658ebeb332bd347898a80bcb7b833e0ef 100644 (file)
@@ -325,7 +325,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.