[Python-3000-checkins] r56455 - python/branches/p3yk/Lib/idlelib/PyShell.py

kurt.kaiser python-3000-checkins at python.org
Thu Jul 19 08:12:15 CEST 2007


Author: kurt.kaiser
Date: Thu Jul 19 08:12:15 2007
New Revision: 56455

Modified:
   python/branches/p3yk/Lib/idlelib/PyShell.py
Log:
Was modifying dict during iteration.


Modified: python/branches/p3yk/Lib/idlelib/PyShell.py
==============================================================================
--- python/branches/p3yk/Lib/idlelib/PyShell.py	(original)
+++ python/branches/p3yk/Lib/idlelib/PyShell.py	Thu Jul 19 08:12:15 2007
@@ -676,7 +676,7 @@
 
     def checklinecache(self):
         c = linecache.cache
-        for key in c.keys():
+        for key in list(c.keys()):
             if key[:1] + key[-1:] != "<>":
                 del c[key]
 


More information about the Python-3000-checkins mailing list