I'm an idiot

Fredrik Lundh fredrik at pythonware.com
Sat Jun 29 13:16:48 EDT 2002


Sean 'Shaleh' Perry wrote:
> the python idiom is usually either:
>
> while 1:
>   line = f.readline()
>   if not line: break

no, the idiom is:

    while 1:
        line = f.readline()
        if not line:
            break
        ...


</F>





More information about the Python-list mailing list