From c0418160457970c4654ad8d910cd0ad21a02f3f7 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Sun, 1 Oct 2017 19:37:19 -0400 Subject: [PATCH] [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) --- Lib/idlelib/iomenu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 @@ 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 ''