Chris Angelico writes:
What Python needs is a non-clunky way to express [filtered iteration].
I don't. In my own code there aren't any else-less cases of for: if:. All the filtered iterations have intervening code at the top of the loop before the if. Most could be refactored to use filtered iteration, but it would come at a cost in readability because the filters are moderately complex expressions, the auxiliaries used in the filter condition have meaningful names in the problem domain. Also, the auxiliaries are sometimes used in the loop body. But if somebody's willing to do the spade work to show that filtered iteration would clarify a fair number of loops in a substantial existing corpus, I'll be happy to overcome my aversion to new syntax and get behind it for those who do need it. Steve