[issue10220] Make generator state easier to introspect
report at bugs.python.org
Thu Oct 28 15:05:10 CEST 2010
Nick Coghlan <ncoghlan at gmail.com> added the comment:
On Thu, Oct 28, 2010 at 10:55 PM, Antoine Pitrou <report at bugs.python.org> wrote:
> Antoine Pitrou <pitrou at free.fr> added the comment:
> Is it CPython-specific?
The states are not CPython-specific (they're logical states of the
underlying generator), but I don't know if other implementations
expose generator and frame details in the same way (all the more
reason to put this in inspect - other implementations can provide the
information without needing to exactly mimic gi_frame and f_lasti).
> Does "currently executing" also include "currently closing"?
"Currently executing" means the frame is being evaluated in a Python
thread (the thread running it may be suspended in a multi-threaded
environment, but the frame itself is in the middle of doing something,
which may include processing a thrown in GeneratorExit)
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list