[Python-checkins] [3.6] IDLE: make filetypes a tuple constant. (GH-3847) (#3848)
Terry Jan Reedy
webhook-mailer at python.org
Sun Oct 1 19:37:22 EDT 2017
https://github.com/python/cpython/commit/c0418160457970c4654ad8d910cd0ad21a02f3f7
commit: c0418160457970c4654ad8d910cd0ad21a02f3f7
branch: 3.6
author: Terry Jan Reedy <tjreedy at udel.edu>
committer: GitHub <noreply at github.com>
date: 2017-10-01T19:37:19-04:00
summary:
[3.6] IDLE: make filetypes a tuple constant. (GH-3847) (#3848)
Save a bit of code, plus non-tuples get converted anyway to tuples by tkinter for the tk call.
(cherry picked from commit 5961e7c156f90c7f9444ae95b9d3e55114ca2169)
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