On 01.03.2017 12:56, Steven D'Aprano wrote:
- How is this implemented? Currently "break" is a simple
unconditional GOTO which jumps past the for block. This will
need to change to something significantly more complex.
one way to implement this with unconditional GOTOs would be (in pseudocode):
LOOP:
on break GOTO EXCEPT
ELSE:
...
GOTO THEN
EXCEPT:
...
THEN:
...
So at the byte-code level (but only there) the order of except and else
would be reversed. Was that a reason why you were asking about the order
of except and else in my proposal?
Anyway, I'm sure there are people much more skilled at compiler
programming than me here.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/