Message148704
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)). |
|
Date |
User |
Action |
Args |
2011-12-01 05:23:25 | ezio.melotti | set | recipients:
+ ezio.melotti, terry.reedy, peter.otten, eric.araujo, meador.inge, docs@python |
2011-12-01 05:23:25 | ezio.melotti | set | messageid: <1322717005.66.0.908101980062.issue13510@psf.upfronthosting.co.za> |
2011-12-01 05:23:25 | ezio.melotti | link | issue13510 messages |
2011-12-01 05:23:24 | ezio.melotti | create | |
|