summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/stdlib2.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-09-04 07:15:32 (GMT)
committerGeorg Brandl <georg@python.org>2007-09-04 07:15:32 (GMT)
commit6911e3ce3f72af759908b869b73391ea00d328e2 (patch)
tree5d4ff6070cb3f0f46f0a31ee4805b41053a06b48 /Doc/tutorial/stdlib2.rst
parentc9879246a2dd33a217960496fdf4606cb117c6a6 (diff)
downloadcpython-6911e3ce3f72af759908b869b73391ea00d328e2.zip
cpython-6911e3ce3f72af759908b869b73391ea00d328e2.tar.gz
cpython-6911e3ce3f72af759908b869b73391ea00d328e2.tar.bz2
Convert all print statements in the docs.
Diffstat (limited to 'Doc/tutorial/stdlib2.rst')
-rw-r--r--Doc/tutorial/stdlib2.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/tutorial/stdlib2.rst b/Doc/tutorial/stdlib2.rst
index af243f3..3ef21d2 100644
--- a/Doc/tutorial/stdlib2.rst
+++ b/Doc/tutorial/stdlib2.rst
@@ -44,7 +44,7 @@ width::
... a list of strings instead of one big string with newlines to separate
... the wrapped lines."""
...
- >>> print textwrap.fill(doc, width=40)
+ >>> print(textwrap.fill(doc, width=40))
The wrap() method is just like fill()
except that it returns a list of strings
instead of one big string with newlines
@@ -121,7 +121,7 @@ placeholders such as the current date, image sequence number, or file format::
>>> for i, filename in enumerate(photofiles):
... base, ext = os.path.splitext(filename)
... newname = t.substitute(d=date, n=i, f=ext)
- ... print '%s --> %s' % (filename, newname)
+ ... print('%s --> %s' % (filename, newname))
img_1074.jpg --> Ashley_0.jpg
img_1076.jpg --> Ashley_1.jpg
@@ -155,7 +155,7 @@ and ``"L"`` representing two and four byte unsigned numbers respectively)::
filename = data[start:start+filenamesize]
start += filenamesize
extra = data[start:start+extra_size]
- print filename, hex(crc32), comp_size, uncomp_size
+ print(filename, hex(crc32), comp_size, uncomp_size)
start += extra_size + comp_size # skip to the next header