mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
bpo-39994: Fix pprint handling of dict subclasses that override __repr__ (GH-21892)
Co-authored-by: Palak Kumar Jha
This commit is contained in:
parent
92c38164a4
commit
582f13786b
4 changed files with 50 additions and 7 deletions
|
@ -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 = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue