[Python-ideas] PEP 315: do-while

Łukasz Langa lukasz at langa.pl
Wed Jun 26 13:44:19 CEST 2013


On 26 cze 2013, at 11:24, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:

> Łukasz Langa wrote:
> Alternatively, the only way I think we can improve on
>> the syntax above is something like this:
>>  do:
>>    <code>
>>    if condition:
>>      break
> 
> But if we take a comprehension with a 'while' clause,
> 
>   [... for a in x while c]

Correct me if I'm wrong but it seems you mixed up two independent threads on the list. I'm discussing an equivalent of the C `do {} while();` loop. This doesn't touch comprehensions at all.

-- 
Best regards,
Łukasz Langa

WWW: http://lukasz.langa.pl/
Twitter: @llanga
IRC: ambv on #python-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130626/89dfad16/attachment.html>


More information about the Python-ideas mailing list