On Sat, Oct 17, 2009 at 10:34 PM, Chris Rebert <c...@rebertia.com> wrote:
> On Sat, Oct 17, 2009 at 10:22 PM, StarWing <weasley...@sina.com> wrote:
<snip>
>> but in python, we only can:
>> cond = 1
>> while cond:
>>    cond = 0
>>    .....
>>    if ....: cond = 1
>>
>> has any polite way to handle this?
>
> It's essentially the same:
>
> while True:
>    ...
>    if not cond: break

Substituting in the appropriate conditional expression for cond of
course (your use of cond for the flag caught me off guard).

Cheers,
Chris
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to