PEP-0315--Enhanced While Loop: An idea for an alternative syntax

Paul Rubin http
Wed Feb 18 18:03:19 CET 2004

"Andrew Koenig" <ark at> writes:
> Any loop that is currently written in the form
>     while True:
>         <statements>
>         if condition:
>             break
>         more statements

If the loop is complicated enough, it's probably easier to just write
it the way you've written it there.  If it's uncomplicated, there's
probably a way to do it with iterators, assignment expressions, or
whatever.  Got a real world example that really benefits from the new

More information about the Python-list mailing list