[Python-ideas] if condition: break idiom

Arnaud Delobelle arnodel at googlemail.com
Mon Sep 22 00:13:40 CEST 2008


There's a missing 'return' in my last post!

On 21 Sep 2008, at 22:10, Arnaud Delobelle wrote:

> def foo(...):
>    while True:
>        if error_condition1:
>            break
>        # Other error conditions, processing, etc
>        # only executes if everything is OK
         return
>
>    # Error condition

-- 
Arnaud




More information about the Python-ideas mailing list