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

Paul Moore p.f.moore at gmail.com
Tue Sep 27 12:34:48 EDT 2016


On 27 September 2016 at 16:54, Erik Bray <erik.m.bray at gmail.com> wrote:
> Then following my own logic it
> would be desirable to also allow the nested for loop syntax of list
> comprehensions outside them as well.

I'd say that it's a case where we should either allow arbitrary
concatenation outside of comprehensions, or we allow none. And as
arbitrary concatenation is obviously bad, the only sane choice is no
nesting :-)

Paul


More information about the Python-ideas mailing list