PEP 317: Eliminate Implicit Exception Instantiation

Greg Ewing (using news.cis.dfn.de) g2h5dqi002 at sneakemail.com
Mon Jun 9 22:42:21 EDT 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
http://www.cosc.canterbury.ac.nz/~greg





More information about the Python-list mailing list