[Python-ideas] Control Flow - Never Executed Loop Body

Michael Selik mike at selik.org
Mon Mar 21 20:04:38 EDT 2016


On Mon, Mar 21, 2016 at 7:59 PM Rob Cliffe <rob.cliffe at btinternet.com>
wrote:

> What about allowing "then" to have an
> indent between that of the for-statement and the for-body:
>
> for x in stuff():
>                  foo(x)
>          then:
>                  bar()
>
> Of course, you still have to learn it, like all idioms, but having
> learned it, isn't it a bit more readable?
>

Either I haven't learned it or more indentation levels makes things harder
to read.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160322/be6ce140/attachment.html>


More information about the Python-ideas mailing list