while loop with f.readline()

Fredrik Lundh fredrik at pythonware.com
Thu Feb 15 02:11:46 EST 2001


Jeff Epler wrote:
> This is one reason that 2.1 will include "xreadlines", which will work
> just like the above:
>         for z in f.xreadlines():
>                 print z
> but will never hold the entire file in memory.

never?  not even if it's a single byte? ;-)

Cheers /F





More information about the Python-list mailing list