[Python-ideas] for-while statement

Oscar Benjamin oscar.j.benjamin at gmail.com
Wed Feb 19 16:02:25 CET 2014


On 19 February 2014 13:34, Alejandro López Correa <alc at spika.net> wrote:
> Hello,
>
> I think adding an optional "WHILE" clause in "FOR" loops might be
> useful sometimes (shorter code and/or improved readability):
>
> for #VAR# in #SEQUENCE# while #WATCHDOG_EXPRESSION#:
>   #CODE_BLOCK#

This idea comes up repeatedly. You might want to read some of the
previous discussions about it:

https://mail.python.org/pipermail/python-ideas/2013-January/018969.html
https://mail.python.org/pipermail/python-ideas/2009-January/002466.html
https://mail.python.org/pipermail/python-ideas/2013-June/021554.html


Oscar


More information about the Python-ideas mailing list