[Python-3000] sys.exc_info()

Antoine Pitrou solipsis at pitrou.net
Sun Jun 1 00:52:51 CEST 2008


Hello again,

> Why not move f_exc_* into the PyTryBlock struct?  We can eliminate the
> per-thread exception and have sys.exc_info() search the stack for an
> active except block.  No need to swap anything because the stack is
> always current.

Yes it's a possible implementation. At the expense of a performance hit for
operations which currently use tstate->exc_* (sys.exc_info() itself, bare
"raise"...).

Right now I have a patch using my original implementation proposal. I'll post it
soon.

regards

Antoine.




More information about the Python-3000 mailing list