Phillip J. Eby wrote:
> My use case for throw() calls for the latter option; i.e., the exception is 
> raised by the yield expression at the resumption point.  Keep in mind that 
> if the exception passes out of the generator, the throw() call will show in 
> the traceback anyway.  It's unlikely the generator itself will inspect the 
> traceback and need to see the throw() call as if it were nested.

There mightn't be much choice anyway. If the frame making
the call to throw() were to be made the starting point for
the traceback, and the exception propagated back to the
throw, something would try to put the same frame in the
traceback twice, which can't work since it's a linked
list.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,          | A citizen of NewZealandCorp, a       |
Christchurch, New Zealand          | wholly-owned subsidiary of USA Inc.  |
[EMAIL PROTECTED]          +--------------------------------------+
_______________________________________________
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

Reply via email to