PEP 315: Enhanced While Loop

Andrew Koenig ark at research.att.com
Mon May 5 17:36:38 EDT 2003


>> while:
>>     <setup code>
>> and while <condition>:
>>     <loop body>

Gareth> This is very elegant. It's a pity that it doesn't work well
Gareth> for the special case of a "do...while" loop, though.

        while:
            <loop body>
        and while <condition>:
            pass

-- 
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark




More information about the Python-list mailing list