while true: !!!
Steve
smnordby at yahoo.com
Wed Dec 13 08:07:18 EST 2000
Yes, I should have prefaced my post with: "The files I read are less
than 3000 lines and less than 150kB, so I can get away with using a for
loop".
-Steve-
Fredrik Lundh wrote:
>
> "Steve" wrote:
> > I dislike infinite while loops and use:
> >
> > for line in file.readlines()
> > ...do stuff...
>
> what makes you so sure that's not an infinite loop?
>
> (well, in the current implementation, it isn't: if your file
> has more than 2147483647 lines, your code won't read
> all of them... ;-)
>
> </F>
More information about the Python-list
mailing list