aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/json/decoder.py
diff options
context:
space:
mode:
authorINADA Naoki <methane@users.noreply.github.com>2018-04-03 12:39:47 +0900
committerGitHub <noreply@github.com>2018-04-03 12:39:47 +0900
commit629338f1404ea9cd75e4fb0389a2fbe1b589de43 (patch)
tree228b72a6402a785a70ceab1ba94049634e07ea38 /Lib/json/decoder.py
parentbadb894bbbb8aaa8b669c4a6f675a0bc7d98e188 (diff)
downloadcpython-629338f1404ea9cd75e4fb0389a2fbe1b589de43.tar.gz
cpython-629338f1404ea9cd75e4fb0389a2fbe1b589de43.zip
bpo-32360: Remove object_pairs_hook=OrderedDict examples (GH-5001)
Diffstat (limited to 'Lib/json/decoder.py')
-rw-r--r--Lib/json/decoder.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/json/decoder.py b/Lib/json/decoder.py
index 3741deed7d5..d7d824454e1 100644
--- a/Lib/json/decoder.py
+++ b/Lib/json/decoder.py
@@ -292,10 +292,8 @@ class JSONDecoder(object):
``object_pairs_hook``, if specified will be called with the result of
every JSON object decoded with an ordered list of pairs. The return
value of ``object_pairs_hook`` will be used instead of the ``dict``.
- This feature can be used to implement custom decoders that rely on the
- order that the key and value pairs are decoded (for example,
- collections.OrderedDict will remember the order of insertion). If
- ``object_hook`` is also defined, the ``object_pairs_hook`` takes
+ This feature can be used to implement custom decoders.
+ If ``object_hook`` is also defined, the ``object_pairs_hook`` takes
priority.
``parse_float``, if specified, will be called with the string
@@ -317,7 +315,6 @@ class JSONDecoder(object):
characters will be allowed inside strings. Control characters in
this context are those with character codes in the 0-31 range,
including ``'\\t'`` (tab), ``'\\n'``, ``'\\r'`` and ``'\\0'``.
-
"""
self.object_hook = object_hook
self.parse_float = parse_float or float