[Python-ideas] "while ... try" - block or "for ... try" - block

Eli Bendersky eliben at gmail.com
Thu Jan 12 08:50:55 CET 2012

2012/1/11 Manuel Bärenz <manuel at enigmage.de>

> I propose two new control flows for Python:
> "while ... try":
> while expr try:
>    suite1
> except SomeException:
>    suite2
> else:
>    suite3

Thanks for the improvement idea, but I must admit I'm -1 on this. Having
first looked at the proposed syntax without your explanation, I found it
hard to be sure what it does, and this goes against the spirit of Python.
The compound statement it purports to replace is just one indent deeper and
much clearer.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120112/543620f4/attachment.html>

More information about the Python-ideas mailing list