Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 183fd40

Browse files
committed
Fix indent error in __format(): del context[objid] at the end should
be executed in all cases, not just when it's not a list, tuple or dict. Discovered by Christian Tismer.
1 parent 65f4a3b commit 183fd40

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/pprint.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ def __format(self, object, stream, indent, allowance, context, level):
176176

177177
else:
178178
stream.write(rep)
179-
del context[objid]
179+
180+
del context[objid]
180181

181182
def __repr(self, object, context, level):
182183
repr, readable = _safe_repr(object, context, self.__depth, level)

0 commit comments

Comments
 (0)