Message148693
| Author |
terry.reedy |
| Recipients |
docs@python, eric.araujo, ezio.melotti, peter.otten, terry.reedy |
| Date |
2011年11月30日.22:54:25 |
| SpamBayes Score |
1.1196406e-08 |
| Marked as misclassified |
No |
| Message-id |
<1322693666.58.0.787455210926.issue13510@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This current line is
"Read and return a list of lines from the stream. hint can be specified to control the number of lines read: no more lines will be read if the total size (in bytes/characters) of all lines so far exceeds hint."
I would like to see added
"Since a file is a line iterator, file.readlines() == list(file). To save time and space, iterate over lines of a file with for line in file: process(line)."
(with code markup for the two snippets). |
|