summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2007-12-10 22:09:44 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2007-12-10 22:09:44 (GMT)
commitb9f7f24c2537e40e06de6f12c29f786215b64912 (patch)
treec5f09ca8de9962d295e8d4ca31badb951ccb6d17 /Lib/idlelib
parenta5535f2b36fb718661ef87d7ce8549548cb9e1af (diff)
downloadcpython-b9f7f24c2537e40e06de6f12c29f786215b64912.zip
cpython-b9f7f24c2537e40e06de6f12c29f786215b64912.tar.gz
cpython-b9f7f24c2537e40e06de6f12c29f786215b64912.tar.bz2
Two IDLE errors in Option->Configure menu.
Reported by Mark Summerfield.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/tabbedpages.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/idlelib/tabbedpages.py b/Lib/idlelib/tabbedpages.py
index 98f6a27..bb8b1ae 100644
--- a/Lib/idlelib/tabbedpages.py
+++ b/Lib/idlelib/tabbedpages.py
@@ -145,8 +145,8 @@ class TabBarSet(Frame):
"""
# 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 @@ class TabBarSet(Frame):
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]