question about generators
see_reply_address at something.invalid
Wed Aug 21 08:05:16 CEST 2002
Andreas Leitgeb wrote:
> Maybe I'm misunderstanding this, but
> I strongly want to oppose any implicit propagation of nested
> generator-calls, whether recursive or not.
Don't worry, there wouldn't be any change in
semantics. What I'm talking about would only
be done when executing a "yield every" statement,
and it would only be an optimisation -- the
"yield every" statement would still have the
same semantics as a for-loop with a "yield"
> There may be better words than "every", perhaps "each" sounds better
> in this context.
I was originally thinking of using "yield from",
in the interests of re-using an existing keyword.
But since it can be a pseudo-keyword, that's
not really an issue.
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
More information about the Python-list