On 24.02.2017 05:45, Chris Angelico wrote:
Don't forget that you can rewrite a "for-if" using two additional
lines and no indents, rather than one line and one indent:

for ...:
     if not (...):
         continue
     ...
     ...

That's exactly what I meant by "for+if+continue". At work we even set a guideline for this to prevent excessive indentation for longer loop bodies.

So you can take your pick which version you want. Granted, I can still
see value in the for-if statement, but not enough to justify new
syntax.

Sven
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to