]> granicus.if.org Git - python/commitdiff
Fix indent error in __format(): del context[objid] at the end should
authorGuido van Rossum <guido@python.org>
Thu, 2 Sep 1999 15:09:44 +0000 (15:09 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 2 Sep 1999 15:09:44 +0000 (15:09 +0000)
be executed in all cases, not just when it's not a list, tuple or
dict.  Discovered by Christian Tismer.

Lib/pprint.py

index fdfdc4395fd041f529366e1ef5234c6f59894db2..6704f9b23f71fbcc3adbe346e8fe6310612d29e0 100644 (file)
@@ -176,7 +176,8 @@ class PrettyPrinter:
 
         else:
             stream.write(rep)
-            del context[objid]
+
+        del context[objid]
 
     def __repr(self, object, context, level):
         repr, readable = _safe_repr(object, context, self.__depth, level)