[Python-ideas] The async API of the future: yield-from
ncoghlan at gmail.com
Mon Oct 15 16:50:39 CEST 2012
On Tue, Oct 16, 2012 at 12:16 AM, Calvin Spealman <ironfroggy at gmail.com> wrote:
> I'm still -1 on delegating control to subgenerators with yield-from,
> versus having the scheduler just deal with them directly. I think it
> is far less flexible.
Um, yield from is to generators as calls are to functions...
delegating to subgenerators, regardless of context, is what it's
*for*. Without it, the scheduler will have to do quite a bit of extra
work to reconstruct sane stack traces.
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas