diff options
author | Irit Katriel <iritkatriel@yahoo.com> | 2020-08-30 17:29:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-30 17:29:53 (GMT) |
commit | 582f13786bb75c73d609790967fea03a5b50148a (patch) | |
tree | 18c1ca220cb3207c54fdb249b58a03a8391bb7db /Lib/pprint.py | |
parent | 92c38164a42572e2bc0b1b1490bec2369480ae08 (diff) | |
download | cpython-582f13786bb75c73d609790967fea03a5b50148a.zip cpython-582f13786bb75c73d609790967fea03a5b50148a.tar.gz cpython-582f13786bb75c73d609790967fea03a5b50148a.tar.bz2 |
bpo-39994: Fix pprint handling of dict subclasses that override __repr__ (GH-21892)
Co-authored-by: Palak Kumar Jha
Diffstat (limited to 'Lib/pprint.py')
-rw-r--r-- | Lib/pprint.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/Lib/pprint.py b/Lib/pprint.py index 7c1118a..213998e 100644 --- a/Lib/pprint.py +++ b/Lib/pprint.py @@ -176,12 +176,6 @@ class PrettyPrinter: p(self, object, stream, indent, allowance, context, level + 1) del context[objid] return - elif isinstance(object, dict): - context[objid] = 1 - self._pprint_dict(object, stream, indent, allowance, - context, level + 1) - del context[objid] - return stream.write(rep) _dispatch = {} |