diff options
author | Jan Max Meyer <jmm@phorward.de> | 2024-02-28 13:54:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-28 13:54:12 (GMT) |
commit | 647053fed182066d3b8c934fb0bf52ee48ff3911 (patch) | |
tree | 7744fbebf95291922cc730f4fd5063da93beca2e /Lib/json | |
parent | 449c6da2bdc5c6aa5e096aa550a4ba377b85db46 (diff) | |
download | cpython-647053fed182066d3b8c934fb0bf52ee48ff3911.zip cpython-647053fed182066d3b8c934fb0bf52ee48ff3911.tar.gz cpython-647053fed182066d3b8c934fb0bf52ee48ff3911.tar.bz2 |
doc: Use super() in subclassed JSONEncoder examples (GH-115565)
Replace calls to `json.JSONEncoder.default(self, obj)`
by `super().default(obj)` within the examples of the documentation.
Diffstat (limited to 'Lib/json')
-rw-r--r-- | Lib/json/encoder.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/json/encoder.py b/Lib/json/encoder.py index 45f5477..597849e 100644 --- a/Lib/json/encoder.py +++ b/Lib/json/encoder.py @@ -174,7 +174,7 @@ class JSONEncoder(object): else: return list(iterable) # Let the base class default method raise the TypeError - return JSONEncoder.default(self, o) + return super().default(o) """ raise TypeError(f'Object of type {o.__class__.__name__} ' |