summaryrefslogtreecommitdiffstats
path: root/Lib/pprint.py
diff options
context:
space:
mode:
authorIrit Katriel <iritkatriel@yahoo.com>2020-08-30 17:29:53 (GMT)
committerGitHub <noreply@github.com>2020-08-30 17:29:53 (GMT)
commit582f13786bb75c73d609790967fea03a5b50148a (patch)
tree18c1ca220cb3207c54fdb249b58a03a8391bb7db /Lib/pprint.py
parent92c38164a42572e2bc0b1b1490bec2369480ae08 (diff)
downloadcpython-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.py6
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 = {}