summaryrefslogtreecommitdiffstats
path: root/Lib/json/encoder.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-03-18 02:06:18 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-03-18 02:06:18 (GMT)
commit35893b799496c8a9d118e64b49f10ac9bf369760 (patch)
treeba99bd751ea4e1d08d524b2a9f316b28d37075c6 /Lib/json/encoder.py
parent271e56e88740cdcc2a6bddbd0894aec25f984f4e (diff)
downloadcpython-35893b799496c8a9d118e64b49f10ac9bf369760.zip
cpython-35893b799496c8a9d118e64b49f10ac9bf369760.tar.gz
cpython-35893b799496c8a9d118e64b49f10ac9bf369760.tar.bz2
#16057: Clarify why the base method default is called in custom encoders.
Original patch by Kushal Das.
Diffstat (limited to 'Lib/json/encoder.py')
-rw-r--r--Lib/json/encoder.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/json/encoder.py b/Lib/json/encoder.py
index 4d1aaa8..f5eeed7 100644
--- a/Lib/json/encoder.py
+++ b/Lib/json/encoder.py
@@ -177,6 +177,7 @@ class JSONEncoder(object):
pass
else:
return list(iterable)
+ # Let the base class default method raise the TypeError
return JSONEncoder.default(self, o)
"""