]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#22170: avoid printing newlines twice in tutorial example.
authorEzio Melotti <ezio.melotti@gmail.com>
Fri, 8 Aug 2014 14:23:32 +0000 (17:23 +0300)
committerEzio Melotti <ezio.melotti@gmail.com>
Fri, 8 Aug 2014 14:23:32 +0000 (17:23 +0300)
Doc/tutorial/classes.rst

index 6c71d80e03bb0d4f64ca9ab1d4ce69160d109eef..11e07e352dfc068a9b817d49070956243f6c8df8 100644 (file)
@@ -802,7 +802,7 @@ using a :keyword:`for` statement::
    for char in "123":
        print(char)
    for line in open("myfile.txt"):
-       print(line)
+       print(line, end='')
 
 This style of access is clear, concise, and convenient.  The use of iterators
 pervades and unifies Python.  Behind the scenes, the :keyword:`for` statement