[Raymond Hettinger]
Are the value and traceback arguments optional as they are with the
current raise statement? If they are optional, what would the
default
be? I think the preferred choice is to have the call to the throw
method be the anchor point. That makes sense in a traceback so
At 01:24 PM 5/18/2005 -0400, Raymond Hettinger wrote:
- g.throw(type, value, traceback) causes the specified exception to be
thrown at the place where the generator g is currently suspended.
Are the value and traceback arguments optional as they are with the
current raise statement? If they
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