Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5961e7c

Browse files
authored
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.
1 parent 2102c78 commit 5961e7c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/idlelib/iomenu.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,11 +487,11 @@ def print_window(self, event):
487487
opendialog = None
488488
savedialog = None
489489

490-
filetypes = [
490+
filetypes = (
491491
("Python files", "*.py *.pyw", "TEXT"),
492492
("Text files", "*.txt", "TEXT"),
493493
("All files", "*"),
494-
]
494+
)
495495

496496
defaultextension = '.py' if sys.platform == 'darwin' else ''
497497

0 commit comments

Comments
 (0)