[Python-ideas] yield from multiple iterables (was Re: The async API of the future: yield-from)
greg.ewing at canterbury.ac.nz
Sun Oct 21 02:09:04 CEST 2012
Christian Tismer wrote:
> A rough idea would be to start the whole interpreter in suspendable
> mode. Maybe that's too much. I'm seeking a way to tell a whole bunch
> of functions that they should be suspendable.
I'm not sure it's really feasible to do that. It seems easy
enough at first sight, but keep in mind that it would only work
for pure Python code called directly from other pure Python
code. There are many corners where it wouldn't work -- all the
operator methods, for example, and anything else called through
a type slot -- unless you went to a *lot* of work to provide
alternative suspendable versions of all the type slots.
More information about the Python-ideas