From: Terry Jan Reedy Date: Sun, 1 Oct 2017 23:01:27 +0000 (-0400) Subject: IDLE: make filetypes a tuple constant. (#3847) X-Git-Tag: v3.7.0a2~80 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5961e7c156f90c7f9444ae95b9d3e55114ca2169;p=python 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. --- diff --git a/Lib/idlelib/iomenu.py b/Lib/idlelib/iomenu.py index 3414c7b3af..f9b6907b40 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 ''