[Python-ideas] Cofunctions - Getting away from the iterator protocol
Greg Ewing
greg.ewing at canterbury.ac.nz
Sun Nov 6 21:43:17 CET 2011
Ron Adam wrote:
> I still haven't quite worked out how to get back to the original
> next(), .send() or .throw() call.
Keeping the protocols fully separated requires more than
just adding methods to the generator. It also requires either
its own version of the yield-from chain or some other way
of keeping track of the stack of active generators. Once
you have that, it becomes clearer how to get back to the
right place.
--
Greg
More information about the Python-ideas
mailing list