On 04.10.2016 15:20, Random832 wrote:
The *real* question is what "break" should do. I think it should
likewise break from the outermost for-loop (but "continue" should still
continue the innermost one), but this does mean that it's not
mechanically identical to the "equivalent" nested loops [it would,
however, make it mechanically identical to the "generator and single
loop" form]
To me, a for loop starts with a "for" and ends with a ":". I wouldn't
mind the ability of more "for"s or "if"s in between. I would skip over
them anyway while reading. Technically, I agree with you as it matches
my intuition:
for blaa foo blah blaaaa blubber babble:
break # go outside
continue # go to next item
else:
# no break
Cheers,
Sven
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/