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/weakref.rst b/Doc/library/weakref.rst
index 44f8d96..940e064 100644
--- a/Doc/library/weakref.rst
+++ b/Doc/library/weakref.rst
@@ -236,7 +236,7 @@
 :const:`None`::
 
    >>> del o, o2
-   >>> print r()
+   >>> print(r())
    None
 
 Testing that a weak reference object is still live should be done using the
@@ -247,9 +247,9 @@
    o = r()
    if o is None:
        # referent has been garbage collected
-       print "Object has been deallocated; can't frobnicate."
+       print("Object has been deallocated; can't frobnicate.")
    else:
-       print "Object is still live!"
+       print("Object is still live!")
        o.do_something_useful()
 
 Using a separate test for "liveness" creates race conditions in threaded