]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix trivial typo in json module docstring (GH-2274)
authordong-jy <krivergo3@gmail.com>
Tue, 20 Jun 2017 20:07:20 +0000 (04:07 +0800)
committerMariatta <Mariatta@users.noreply.github.com>
Tue, 20 Jun 2017 20:07:20 +0000 (13:07 -0700)
Lib/json/__init__.py

index b8d5e6cff8cb216a2045c84d7a4578d362ee6b35..6d0511ebfe90cf9451e464f714d318f989159f2a 100644 (file)
@@ -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]'