On 7/25/2020 7:28 AM, Chris Angelico wrote:
Do you REALLY think that everyone will automatically understand it
just because it's spelled "for... then" instead of "for... else"?

I wouldn't find "for ... then" any less confusing than "for ... else". I do find "for ... else if not break" easier to understand, but I'm not convinced its worth the hassle over "for ... else # if not break". Four keywords in a row!

But all of these always make me wonder about a return inside the suite. Does the "else" part execute (answer: no). So as a rule, I avoid the construct entirely, not that it comes up very often, anyway.

Eric
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/K2POVCCEV7QDY7LWBTRDLP2UW54VTHXM/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to