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 the buffering policy 
used with pipes.

I'm also dubious about the buffering optimisation for the pipe case but 
readline() documentation should state that it will never use such buffering 
mechanism so we can safely use it when dealing with pipe.

Thanks

----------
nosy: +fmoreau

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue3907>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to