Partial py3k-ification of Doc/library/: convert has_key references into either 'k in d' or __contains__; normalize raise statements; convert print statements into print function calls.
diff --git a/Doc/library/tkinter.rst b/Doc/library/tkinter.rst
index c4df617..f6c5c61 100644
--- a/Doc/library/tkinter.rst
+++ b/Doc/library/tkinter.rst
@@ -184,7 +184,7 @@
class Application(Frame):
def say_hi(self):
- print "hi there, everyone!"
+ print("hi there, everyone!")
def createWidgets(self):
self.QUIT = Button(self)
@@ -441,7 +441,7 @@
Example::
- >>> print fred.config()
+ >>> print(fred.config())
{'relief' : ('relief', 'relief', 'Relief', 'raised', 'groove')}
Of course, the dictionary printed will include all the options available and
@@ -560,8 +560,8 @@
self.print_contents)
def print_contents(self, event):
- print "hi. contents of entry is now ---->", \
- self.contents.get()
+ print("hi. contents of entry is now ---->",
+ self.contents.get())
The Window Manager
@@ -633,7 +633,7 @@
This is any Python function that takes no arguments. For example::
def print_it():
- print "hi there"
+ print("hi there")
fred["command"] = print_it
color