summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/tkinter.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/tkinter.rst b/Doc/library/tkinter.rst
index 4af4b73..60cf892 100644
--- a/Doc/library/tkinter.rst
+++ b/Doc/library/tkinter.rst
@@ -205,6 +205,7 @@ A Simple Hello World Program
class Application(tk.Frame):
def __init__(self, master=None):
super().__init__(master)
+ self.master = master
self.pack()
self.create_widgets()
@@ -215,7 +216,7 @@ A Simple Hello World Program
self.hi_there.pack(side="top")
self.quit = tk.Button(self, text="QUIT", fg="red",
- command=root.destroy)
+ command=self.master.destroy)
self.quit.pack(side="bottom")
def say_hi(self):