[issue36066] Add `empty` block to `for` and `while` loops.

Karthikeyan Singaravelan report at bugs.python.org
Thu Feb 21 09:41:42 EST 2019


Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:

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.

----------
nosy: +xtreak

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36066>
_______________________________________


More information about the Python-bugs-list mailing list