This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients docs@python, eric.araujo, ezio.melotti, meador.inge, peter.otten, terry.reedy
Date 2011-12-01.05:23:24
SpamBayes Score 9.290135e-11
Marked as misclassified No
Message-id <1322717005.66.0.908101980062.issue13510@psf.upfronthosting.co.za>
In-reply-to
Content
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)).
History
Date User Action Args
2011-12-01 05:23:25ezio.melottisetrecipients: + ezio.melotti, terry.reedy, peter.otten, eric.araujo, meador.inge, docs@python
2011-12-01 05:23:25ezio.melottisetmessageid: <1322717005.66.0.908101980062.issue13510@psf.upfronthosting.co.za>
2011-12-01 05:23:25ezio.melottilinkissue13510 messages
2011-12-01 05:23:24ezio.melotticreate