]> granicus.if.org Git - python/commitdiff
Fix trivial typo in json module docstring (GH-2274) (GH-2432)
authorMariatta <Mariatta@users.noreply.github.com>
Thu, 6 Jul 2017 03:55:30 +0000 (20:55 -0700)
committerGitHub <noreply@github.com>
Thu, 6 Jul 2017 03:55:30 +0000 (20:55 -0700)
(cherry picked from commit 76c567ee27342d76f631a35c8291b715b2a61f3e)

Lib/json/__init__.py

index d1be041658ebeb332bd347898a80bcb7b833e0ef..ce623611c1528483b2cb02d0aeb955d75e88e3cc 100644 (file)
@@ -78,7 +78,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]'