diff Doc/tutorial/stdlib2.rst @ 43219:655071bf6c45

Convert all print statements in the docs.
author Georg Brandl <georg@python.org>
date Tue, 04 Sep 2007 07:15:32 +0000
parents 4902671dd678
children ff1766eb2fce
line wrap: on
line diff
--- a/Doc/tutorial/stdlib2.rst	Tue Sep 04 07:07:56 2007 +0000
+++ b/Doc/tutorial/stdlib2.rst	Tue Sep 04 07:15:32 2007 +0000
@@ -44,7 +44,7 @@
    ... 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 @@
    >>> 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 @@
        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