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

Éric Araujo report at bugs.python.org
Thu Oct 25 16:36:54 CEST 2012


Éric Araujo added the comment:

readlines might be discouraged; readline has its use cases (two days ago I used it to get one line to pass to csv.Sniffer.sniff), but next(file) works too, so it could be de-emphasized.  There may be a difference with respect to the trailing newline however; I don’t remember if __iter__ or readline keep it or not.

----------

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


More information about the docs mailing list