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/stringio.rst b/Doc/library/stringio.rst
index 4736fc3..192e310 100644
--- a/Doc/library/stringio.rst
+++ b/Doc/library/stringio.rst
@@ -45,7 +45,7 @@
 
    output = StringIO.StringIO()
    output.write('First line.\n')
-   print >>output, 'Second line.'
+   print('Second line.', file=output)
 
    # Retrieve file contents -- this will be
    # 'First line.\nSecond line.\n'
@@ -111,7 +111,7 @@
 
    output = cStringIO.StringIO()
    output.write('First line.\n')
-   print >>output, 'Second line.'
+   print('Second line.', file=output)
 
    # Retrieve file contents -- this will be
    # 'First line.\nSecond line.\n'