Message 336223 - Python tracker (original) (raw)

I would recommend posting this on python-ideas to get some feedback. This introduces new control flow and breaks some old assumptions as in third case empty block is executed and there might be code that depends upon current for-else behavior where else should be executed. Also reading the examples initially this seems to add little cognitive overhead too since there is now empty and else that are executed based on empty iterable, breaking out of the loop, natural ending of the loop which might make this little hard to teach too.