Francis Moreau added the comment:
Sorry for reopening this bug, but I agree with the OP, and I can still see the
exact same behaviour on python 2.7.6 (archlinux).
At least, the documentation should clarify that doing for line in file is not
strictly equivalent to the readline way regarding to
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: +Python 2.7 -Python 2.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3907
___
___
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
Python 2.6 and 3.0 come with a completely new I/O implementation, which
correctly handle pipes in this regard (I just tested).
http://docs.python.org/dev/library/io.html
With the 3.0 version, the built-in open() is an alias for io.open;
New submission from endolith [EMAIL PROTECTED]:
One of the principles of Python is that There should be one-- and
preferably only one --obvious way to do it. It seems that the for
line in file idiom is The Way to iterate over the lines of a file, and
older more explicit methods are deprecated.