bpo-34964: Make Tkinter sources more readable by adding blank lines. (GH-9822)
diff --git a/Lib/tkinter/filedialog.py b/Lib/tkinter/filedialog.py
index a71afb2..d9d3436 100644
--- a/Lib/tkinter/filedialog.py
+++ b/Lib/tkinter/filedialog.py
@@ -264,7 +264,6 @@
self.quit(file)
-
# For the following classes and modules:
#
# options (all have default values):
@@ -341,6 +340,7 @@
return self._fixresult(widget, widget.tk.splitlist(result))
return _Dialog._fixresult(self, widget, result)
+
class SaveAs(_Dialog):
"Ask for a filename to save as"
@@ -369,16 +369,19 @@
#
# convenience stuff
+
def askopenfilename(**options):
"Ask for a filename to open"
return Open(**options).show()
+
def asksaveasfilename(**options):
"Ask for a filename to save as"
return SaveAs(**options).show()
+
def askopenfilenames(**options):
"""Ask for multiple filenames to open
@@ -390,6 +393,7 @@
# FIXME: are the following perhaps a bit too convenient?
+
def askopenfile(mode = "r", **options):
"Ask for a filename to open, and returned the opened file"
@@ -398,6 +402,7 @@
return open(filename, mode)
return None
+
def askopenfiles(mode = "r", **options):
"""Ask for multiple filenames and return the open file
objects
@@ -423,12 +428,12 @@
return open(filename, mode)
return None
+
def askdirectory (**options):
"Ask for a directory, and return the file name"
return Directory(**options).show()
-
# --------------------------------------------------------------------
# test stuff
@@ -475,5 +480,6 @@
saveasfilename=asksaveasfilename()
print("saveas", saveasfilename.encode(enc))
+
if __name__ == '__main__':
test()