[Python-checkins] IDLE: make filetypes a tuple constant. (#3847)

Terry Jan Reedy webhook-mailer at python.org
Sun Oct 1 19:01:30 EDT 2017


https://github.com/python/cpython/commit/5961e7c156f90c7f9444ae95b9d3e55114ca2169
commit: 5961e7c156f90c7f9444ae95b9d3e55114ca2169
branch: master
author: Terry Jan Reedy <tjreedy at udel.edu>
committer: GitHub <noreply at github.com>
date: 2017年10月01日T19:01:27-04:00
summary:
IDLE: make filetypes a tuple constant. (#3847)
Save a bit of code, plus non-tuples get converted anyway to tuples by tkinter for the tk call.
files:
M Lib/idlelib/iomenu.py
diff --git a/Lib/idlelib/iomenu.py b/Lib/idlelib/iomenu.py
index 3414c7b3aff..f9b6907b40c 100644
--- a/Lib/idlelib/iomenu.py
+++ b/Lib/idlelib/iomenu.py
@@ -487,11 +487,11 @@ def print_window(self, event):
 opendialog = None
 savedialog = None
 
- filetypes = [
+ filetypes = (
 ("Python files", "*.py *.pyw", "TEXT"),
 ("Text files", "*.txt", "TEXT"),
 ("All files", "*"),
- ]
+ )
 
 defaultextension = '.py' if sys.platform == 'darwin' else ''
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /