[Python-checkins] cpython (3.4): #22170: avoid printing newlines twice in tutorial example.
ezio.melotti
python-checkins at python.org
Fri Aug 8 16:24:43 CEST 2014
http://hg.python.org/cpython/rev/35db84720d8d
changeset: 92039:35db84720d8d
branch: 3.4
parent: 92037:e306cf07046a
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Fri Aug 08 17:23:32 2014 +0300
summary:
#22170: avoid printing newlines twice in tutorial example.
files:
Doc/tutorial/classes.rst | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst
--- a/Doc/tutorial/classes.rst
+++ b/Doc/tutorial/classes.rst
@@ -802,7 +802,7 @@
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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list