summaryrefslogtreecommitdiffstats
path: root/Lib/json
diff options
context:
space:
mode:
authordong-jy <krivergo3@gmail.com>2017-06-20 20:07:20 (GMT)
committerMariatta <Mariatta@users.noreply.github.com>2017-06-20 20:07:20 (GMT)
commit76c567ee27342d76f631a35c8291b715b2a61f3e (patch)
treec0aaabed6526752799883b9e6178a940c10c1bac /Lib/json
parent5200a7c7f9ea65a96330c5f276f4acc6ec70854e (diff)
downloadcpython-76c567ee27342d76f631a35c8291b715b2a61f3e.zip
cpython-76c567ee27342d76f631a35c8291b715b2a61f3e.tar.gz
cpython-76c567ee27342d76f631a35c8291b715b2a61f3e.tar.bz2
Fix trivial typo in json module docstring (GH-2274)
Diffstat (limited to 'Lib/json')
-rw-r--r--Lib/json/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/json/__init__.py b/Lib/json/__init__.py
index b8d5e6c..6d0511e 100644
--- a/Lib/json/__init__.py
+++ b/Lib/json/__init__.py
@@ -76,7 +76,7 @@ Specializing JSON object encoding::
>>> def encode_complex(obj):
... if isinstance(obj, complex):
... return [obj.real, obj.imag]
- ... raise TypeError(repr(o) + " is not JSON serializable")
+ ... raise TypeError(repr(obj) + " is not JSON serializable")
...
>>> json.dumps(2 + 1j, default=encode_complex)
'[2.0, 1.0]'