iterating over lines in a file
Tim Peters
tim_one at email.msn.com
Sun Jul 23 12:07:35 EDT 2000
[Cliff Crawford, reacting to that the optional "size" argument to
readlines() is treated as a hint, & that the implementation rounds
it in platform-specific ways to a "natural" buffer size]
> Ugh, you're right (I checked fileobject.c to make sure). That makes
> readlines() a lot less useful than I thought it was..:(
How so? It *can't* take the size argument exactly as given, lest it return
a partial line at the end of the returned list more often than not. Most
people would consider it "a lot less useful" then <wink>.
More information about the Python-list
mailing list