[issue13897] Move fields relevant to coroutine/generators out of frame into generator/threadstate

Mark Shannon report at bugs.python.org
Sun Jan 29 22:23:10 CET 2012


Mark Shannon <mark at hotpy.org> added the comment:

The important part is not the change of name, but wrapping them in a 
struct which can be embedded in both PyThreadState and PyGenObject.

The state->exc_XXX trio of values are the currently handled exception
(sys.exc_info()) and are shadowed by generator exception handlers.
My patch models that shadowing rather than swapping the values in and 
out. This allows me to eliminate save_exc_state(), swap_exc_state()
and restore_and_clear_exc_state() completely.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13897>
_______________________________________


More information about the Python-bugs-list mailing list