diff options
author | Georg Brandl <georg@python.org> | 2007-09-04 07:15:32 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-09-04 07:15:32 (GMT) |
commit | 6911e3ce3f72af759908b869b73391ea00d328e2 (patch) | |
tree | 5d4ff6070cb3f0f46f0a31ee4805b41053a06b48 /Doc/library/contextlib.rst | |
parent | c9879246a2dd33a217960496fdf4606cb117c6a6 (diff) | |
download | cpython-6911e3ce3f72af759908b869b73391ea00d328e2.zip cpython-6911e3ce3f72af759908b869b73391ea00d328e2.tar.gz cpython-6911e3ce3f72af759908b869b73391ea00d328e2.tar.bz2 |
Convert all print statements in the docs.
Diffstat (limited to 'Doc/library/contextlib.rst')
-rw-r--r-- | Doc/library/contextlib.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index 070dd88..decac44 100644 --- a/Doc/library/contextlib.rst +++ b/Doc/library/contextlib.rst @@ -26,12 +26,12 @@ Functions provided: @contextmanager def tag(name): - print "<%s>" % name + print("<%s>" % name) yield - print "</%s>" % name + print("</%s>" % name) >>> with tag("h1"): - ... print "foo" + ... print("foo") ... <h1> foo @@ -104,7 +104,7 @@ Functions provided: with closing(urllib.urlopen('http://www.python.org')) as page: for line in page: - print line + print(line) without needing to explicitly close ``page``. Even if an error occurs, ``page.close()`` will be called when the :keyword:`with` block is exited. |