[Python-ideas] The async API of the future: yield-from
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Oct 16 02:55:20 CEST 2012
Calvin Spealman wrote:
> I'm still -1 on delegating control to subgenerators with yield-from,
> versus having the scheduler just deal with them directly.
Do you mean to *disallow* using yield-from for this, or just
not to encourage it?
I don't see how you *could* disallow it; there's no way for
the scheduler to know whether one of the generators it's
handling is delegating using yield-from.
I also can't see any reason you would want to discourage it.
Given that yield-from exists, it's an obvious thing to do.
--
Greg
More information about the Python-ideas
mailing list