PEP 315: Enhanced While Loop

Delaney, Timothy C (Timothy) tdelaney at avaya.com
Mon May 5 19:34:28 EDT 2003


> From: Andrew Koenig [mailto:ark at research.att.com]
> 
>         while <condition1>:
>             <code1>
>         and while <condition2>:
>             <code2>
>         and while <condition3>:
>             <code3>

This would remove my objection to the fact that the condition is outdented, since it provides an obvious indication (and) that it's a continuation of an existing structure.

Hmm ... how does it look without outdenting?

    while [<condition1>]:
        <code1>
        and while <condition2>:
            <code2>
        and while <condition3>:
            <code3>

I think I prefer it with the outdents.

Tim Delaney





More information about the Python-list mailing list