[issue13510] Clarify that readlines() is not needed to iterate over a file

Meador Inge report at bugs.python.org
Thu Dec 1 06:12:29 CET 2011


Meador Inge <meadori at gmail.com> added the comment:

I am skeptical that such a note will help.  The iterator behavior is clearly pointed out in the Python Tutorial [1] and in the IOBase documentation [2].  I suspect this bad code pattern is just being copied and pasted from other sources without folks ever even looking at the Python documentation.

[1] http://docs.python.org/dev/tutorial/inputoutput.html?highlight=readlines#methods-of-file-objects
[2] http://docs.python.org/dev/library/io.html#io.IOBase

----------
nosy: +meador.inge

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13510>
_______________________________________


More information about the Python-bugs-list mailing list