This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lost-theory
Recipients docs@python, lost-theory
Date 2012-12-03.03:41:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354506102.98.0.373990465676.issue16598@psf.upfronthosting.co.za>
In-reply-to
Content
I heard someone complain about this code appearing in the official documentation in a few places:

for line in open("file.txt"):
    print(line)

This code will print two newlines.

I went through the current "default" and "2.7" branches and changed the places where this occurred to use print(line, end="") for 3.x or "print line," for 2.x.

r80699.patch is for the "default" branch (3.x)
r80694.py27.patch is for the "2.7" branch
History
Date User Action Args
2012-12-03 03:41:43lost-theorysetrecipients: + lost-theory, docs@python
2012-12-03 03:41:42lost-theorysetmessageid: <1354506102.98.0.373990465676.issue16598@psf.upfronthosting.co.za>
2012-12-03 03:41:42lost-theorylinkissue16598 messages
2012-12-03 03:41:41lost-theorycreate