[Python-3000] self-contained exceptions

Ka-Ping Yee python at zesty.ca
Thu Jan 4 03:54:00 CET 2007


On Wed, 3 Jan 2007, Adam Olsen wrote:
> That can be solved by moving the weakref to the stack frame -> exc
> part, and only turning it from a strong reference into a weak
> reference when the function exits.  When debugging via the raised
> exception, the chain of __context__ references would keep it alive.

That seems like a reasonable approach to me.  The implementation
might be tricky, but the behaviour sounds correct.


-- ?!ng


More information about the Python-3000 mailing list