summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/EditorWindow.py
diff options
context:
space:
mode:
authorGuilherme Polo <ggpolo@gmail.com>2009-08-14 15:05:30 (GMT)
committerGuilherme Polo <ggpolo@gmail.com>2009-08-14 15:05:30 (GMT)
commit1fff00832639082d2d7aa354c8e6d9110171d6bc (patch)
tree969c400d839ce118c879c0537cd93065c24fe518 /Lib/idlelib/EditorWindow.py
parent6837083582176067868d1cc60772ef9de6ef6bd3 (diff)
downloadcpython-1fff00832639082d2d7aa354c8e6d9110171d6bc.zip
cpython-1fff00832639082d2d7aa354c8e6d9110171d6bc.tar.gz
cpython-1fff00832639082d2d7aa354c8e6d9110171d6bc.tar.bz2
Merged revisions 74446-74449 via svnmerge from
svn+ssh://pythondev/python/trunk ........ r74446 | guilherme.polo | 2009-08-14 10:53:41 -0300 (Fri, 14 Aug 2009) | 1 line Issue #3344: Replace itertools.count by enumerate. ........ r74447 | guilherme.polo | 2009-08-14 11:03:07 -0300 (Fri, 14 Aug 2009) | 1 line Issue #3926: Fix the usage of the new showwarnings and formatwarning. ........ r74448 | guilherme.polo | 2009-08-14 11:36:45 -0300 (Fri, 14 Aug 2009) | 3 lines Issue #1135: Add the XView and YView mix-ins to avoid duplicating the xview* and yview* methods. ........ r74449 | guilherme.polo | 2009-08-14 11:43:43 -0300 (Fri, 14 Aug 2009) | 1 line Clarifying Entry.selection_present's docstring. ........
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r--Lib/idlelib/EditorWindow.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index c1e9e1e..a634962 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -3,7 +3,6 @@ import os
import re
import string
import imp
-from itertools import count
from tkinter import *
import tkinter.simpledialog as tkSimpleDialog
import tkinter.messagebox as tkMessageBox
@@ -785,8 +784,8 @@ class EditorWindow(object):
for instance in self.top.instance_dict:
menu = instance.recent_files_menu
menu.delete(1, END) # clear, and rebuild:
- for i, file in zip(count(), rf_list):
- file_name = file[0:-1] # zap \n
+ for i, file_name in enumerate(rf_list):
+ file_name = file_name.rstrip() # zap \n
# make unicode string to display non-ASCII chars correctly
ufile_name = self._filename_to_unicode(file_name)
callback = instance.__recent_file_callback(file_name)