[Python-Dev] Obtaining stack-frames from co-routine objects

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Jun 14 01:20:57 CEST 2015

Nick Coghlan wrote:
> I wonder if in 3.6 it might be possible to *add* some bookkeeping to
> "await" and "yield from" expressions that provides external visibility
> into the underlying iterable or coroutine that the generator-iterator
> or coroutine has delegated flow control to.

In my original implementation of yield-from, stack frames
had an f_yieldfrom slot referring to the object being
yielded from.

I gather that slot no longer exists at the C level, but
it ought to be possible to provide a Python attribute or
method returning the same information.


More information about the Python-Dev mailing list