[Python-ideas] if-statement in for-loop

David Mertz mertz at gnosis.cx
Tue Oct 4 11:42:23 EDT 2016


On Oct 4, 2016 6:20 AM, "Random832" <random832 at fastmail.com> wrote:
> >     for item in items if item is not None:
> >         ...
> >     else:
> >         # ???

>
> I think it's obvious that it would be on the outermost construct (i.e.
> the one that would still be at the same indentation level fully
> expanded).

I think it's obvious it would be the innermost construct... Or at least
very plausible.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20161004/97dd50f9/attachment.html>


More information about the Python-ideas mailing list