Martin Matusiak added the comment:
I see one potential problem with this, namely that refactoring code that
contains "break n" statements would become more error prone whenever the depth
of the code block gets modified. So if you had something like:
for i in range(10):
for j in range(10):
for k in range(10):
if cond:
break 2
And then you decided to remove the middle loop (on j), the break 2 would send
you to the top level, whereas you might have meant for it to break to the first
level, inside the loop on i.
This is a micro example, of course, but if you imagine the bodies of these
loops being quite long then it could get complicated fast.
----------
components: +Interpreter Core
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue19318>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com