Ezio Melotti <ezio.melo...@gmail.com> added the comment:

FWIW I've seen several persons using "for line in file.readlines(): ..." or 
even "while 1: line = file.readline()".  IMHO it's a good idea to document that 
"without sizehint, it's equivalent to list(file)" and that "for line in file: 
..." can be used directly.  Even if some people don't read the doc, the ones 
who do will benefit from this.  The same note might also be added to the 
docstring (I think it's somewhat common to learn about readlines() through 
dir(file) + help(file.readlines)).

----------

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

Reply via email to