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

Lib/json/__init__.py

index 1118b0eb9903ba19cd681fc131feb6f0f94a99fa..ca2c611bd0e48ce4146117345687eca513eeac97 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]'