[Python-3000-checkins] r59456 - python/branches/py3k/Lib/idlelib/tabbedpages.py

amaury.forgeotdarc python-3000-checkins at python.org
Mon Dec 10 23:09:44 CET 2007


Author: amaury.forgeotdarc
Date: Mon Dec 10 23:09:44 2007
New Revision: 59456

Modified:
   python/branches/py3k/Lib/idlelib/tabbedpages.py
Log:
Two IDLE errors in Option->Configure menu.
Reported by Mark Summerfield.


Modified: python/branches/py3k/Lib/idlelib/tabbedpages.py
==============================================================================
--- python/branches/py3k/Lib/idlelib/tabbedpages.py	(original)
+++ python/branches/py3k/Lib/idlelib/tabbedpages.py	Mon Dec 10 23:09:44 2007
@@ -145,8 +145,8 @@
 
         """
         # remove all tabs and rows
-        for tab_name in self._tabs.keys():
-            self._tabs.pop(tab_name).destroy()
+        while self._tabs:
+            self._tabs.popitem()[1].destroy()
         self._reset_tab_rows()
 
         if not self._tab_names:
@@ -160,7 +160,7 @@
 
         i = 0
         expand_tabs = self.expand_tabs or n_rows > 1
-        for row_index in xrange(n_rows):
+        for row_index in range(n_rows):
             # calculate required number of tabs in this row
             n_tabs = (len(self._tab_names) - i - 1) // (n_rows - row_index) + 1
             tab_names = self._tab_names[i:i + n_tabs]


More information about the Python-3000-checkins mailing list