[Python-ideas] PEP 315: do-while
Guido van Rossum
guido at python.org
Wed Jun 26 17:03:28 CEST 2013
Please reject the PEP. More variations along these lines won't make the
language more elegant or easier to learn. They'd just save a few hasty
folks some typing while making others who have to read/maintain their code
wonder what it means.
--Guido
On Wed, Jun 26, 2013 at 1:47 AM, Łukasz Langa <lukasz at langa.pl> wrote:
> The PEP is deferred because it seems that
>
> while True:
> <code>
> if condition:
> break
>
> is good enough. I agree. We should reject the PEP and summarise
> the status. Alternatively, the only way I think we can improve on
> the syntax above is something like this:
>
> do:
> <code>
> if condition:
> break
>
> or without a new keyword:
>
> while:
> <code>
> if condition:
> break
>
> The empty-predicate variant would let Python check whether there's
> actually a break in the body of the loop.
>
> --
> Best regards,
> Łukasz Langa
>
> WWW: http://lukasz.langa.pl/
> Twitter: @llanga
> IRC: ambv on #python-dev
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>
--
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130626/443ba35c/attachment-0001.html>
More information about the Python-ideas
mailing list