PEP 317: Eliminate Implicit Exception Instantiation

Greg Ewing (using g2h5dqi002 at
Tue Jun 10 04:42:21 CEST 2003

Evan Simpson wrote:
> 2. Treat such combinations as though they were a goto/label pair.  In 
> other words, rather than invoking the exception machinery, compile the 
> "raise" into a jump bytecode.

Ironically, break and continue do actually invoke something
not altogether completely unlike the exception machinery!

They're not just jumps - they have to unwind the exception
handler stack so that finallies get executed (and I think
they unwind for-loop contexts, too). So this mightn't buy
you all that much.

Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand

More information about the Python-list mailing list