]> granicus.if.org Git - python/commitdiff
IDLE: make filetypes a tuple constant. (#3847)
authorTerry Jan Reedy <tjreedy@udel.edu>
Sun, 1 Oct 2017 23:01:27 +0000 (19:01 -0400)
committerGitHub <noreply@github.com>
Sun, 1 Oct 2017 23:01:27 +0000 (19:01 -0400)
Save a bit of code, plus non-tuples get converted anyway to tuples by tkinter for the tk call.

Lib/idlelib/iomenu.py

index 3414c7b3aff4b39440a710b7841ccb89de043843..f9b6907b40cecc062de391e7ac3d9380b378dc96 100644 (file)
@@ -487,11 +487,11 @@ class IOBinding:
     opendialog = None
     savedialog = None
 
-    filetypes = [
+    filetypes = (
         ("Python files", "*.py *.pyw", "TEXT"),
         ("Text files", "*.txt", "TEXT"),
         ("All files", "*"),
-        ]
+        )
 
     defaultextension = '.py' if sys.platform == 'darwin' else ''