> I think it's more complicated than that. If the file > object were to become an object obeying the iterator > protocol, its next() method should really return the > next *byte* of the file. Then you'd still want methods > like read(), readline() etc. for reading in larger > chunks. I don't think so. We should pick the most convenient chunking for the default iterator, and provide explicit ways to ask for other iterators (like dict iterators). Also, since "for line in file" already works, there's a strong precedent for iterating by line by default. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4