mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
#16057: Clarify why the base method default is called in custom encoders.
Original patch by Kushal Das.
This commit is contained in:
parent
f3460414d5
commit
dd246171e4
2 changed files with 3 additions and 0 deletions
|
@ -166,6 +166,7 @@ class JSONEncoder(object):
|
|||
pass
|
||||
else:
|
||||
return list(iterable)
|
||||
# Let the base class default method raise the TypeError
|
||||
return JSONEncoder.default(self, o)
|
||||
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue