]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.6] Fix trivial typo in json module docstring (GH-2274) (#2430)
authorMariatta <Mariatta@users.noreply.github.com>
Sat, 1 Jul 2017 01:15:18 +0000 (18:15 -0700)
committerNed Deily <nad@python.org>
Sat, 1 Jul 2017 01:15:18 +0000 (21:15 -0400)
(cherry picked from commit 76c567ee27342d76f631a35c8291b715b2a61f3e)

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]'