[issue10220] Make generator state easier to introspect

Guido van Rossum report at bugs.python.org
Thu Oct 28 17:04:35 CEST 2010


Guido van Rossum <guido at python.org> added the comment:

I could imagine separating the state into two parts:

- a three-valued enum distinguishing created, active, or exhausted

- a bool (only relevant in the active state) whether it is currently running or suspended

The latter is just g.gi_running so we don't need a new API for this. :-)

----------
nosy: +gvanrossum

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


More information about the Python-bugs-list mailing list