Message173730
| Author |
cvrebert |
| Recipients |
cvrebert, docs@python, eric.araujo, ezio.melotti, meador.inge, peter.otten, terry.reedy |
| Date |
2012年10月25日.05:17:17 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1351142238.27.0.0963448066306.issue13510@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
file.readlines() (and perhaps dare I say even file.readline()) should not even be mentioned in the tutorial, IMO. It is difficult to imagine a use case where just iterating over the file object isn't superior. I cannot remember the last time that I have used either of these methods. They ought to be relegated to the library docs. Presenting `for line in a_file:` as merely "An alternative approach" in the official tutorial is practically archaic. |
|