On 6/17/06, Armin Rigo <[EMAIL PROTECTED]> wrote: > The reason is that the details of the stack behavior of END_FINALLY are > messy in CPython. The finally blocks are the only place where the depth > of the stack is not known in advance: depending on how the finally block > is entered, there will be between one and three objects pushed (a single > None, or an int and another object, or an exception type, instance and > traceback).
FWIW, I see this as an unintended accident and would gratefully accept fixes to the bytecode that made this behavior more regular. I'm not in favor of abusing this to generate a computed goto, and I don't see a need for that -- if we decide to add that (either as syntax or as an automatic optimization) I see no problem adding a new bytecode. Python's bytecode is not sacred or frozen like Java's. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com