It looks it is using this to save a separate, explicit bit that says "we
left this frame by yielding rather than by returning". Note that f_stacktop
is cleared when the frame is re-entered:
stack_pointer = f->f_stacktop;
assert(stack_pointer != NULL);
f->f_stacktop = NULL; /*
This is more an observation and question than anything else, but
perhaps it will stimulate some ideas from the experts. Consider this
trivial generator function:
def gen(a):
yield a
When the YIELD_VALUE instruction is executed, it executes (in the
non-async case):
retval =
On Tue, Apr 21, 2020 at 7:33 AM Victor Stinner wrote:
> IMHO it's worth it to explore the subinterpreters approach. I don't
> think that it's going to be a major maintenance burden: the code is
> already written and tests. The PEP is only about adding a public
> Python API.
While this PEP may