Simon Wittber <[EMAIL PROTECTED]> writes:

>> A function containing an infinite loop will never return, so it is bugged
>> and useless unless it does has an external effect with something like
>> 'print xxx' within the loop.  
>
> I thought the idiom:
>
> while True:
>     #code which iterates my simulation
>     if condition: break
>
> wat quite normal. This is the style loop I am using. 
I think it's a bit abnormal, because you have to scan the loop body
for breaks. I tend to write:

condition = True
while not condition:
    #code which iterates my simulation

But that's just me.

    <mike
-- 
Mike Meyer <[EMAIL PROTECTED]>                  http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to