On Thu, Feb 19, 2009 at 5:15 PM, Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
I want something that means "Do what that stuff
would have done if I'd written it all out right
here." Anyone got a really good thesaurus handy?
I wonder if this isn't going in the wrong direction. This syntax change is being considered because there's no way to change the control flow inside of a function (so that, for example, we can yield multiple items) besides using one of the existing statements or executing some other function. If there were, one could just write:
from itertools import yield_from
yield_all_from(gen)
or whatever.
With functions the lack of external regulation on control flow doesn't seem to be a big deal, but apparently for generators it is… So maybe we need to think more clearly about what kinds of control flow changes are appropriate for generators… Is yield from really going to solve all our problems? Or will we be back for a new keyword in 6 months?
Inconclusively-yours,
-- Carl