generator functions: why won't this work?

Arnaud Delobelle arnodel at googlemail.com
Fri Apr 4 15:16:09 EDT 2008


On Apr 2, 11:04 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
wrote:
> En Wed, 02 Apr 2008 14:11:30 -0300, <castiro... at gmail.com> escribió:
>
> > On Apr 1, 10:42 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
> > wrote:
> >> En Tue, 01 Apr 2008 23:56:50 -0300, <zillo... at googlemail.com> escribió:
>
> >>    yield *iterable
>
> >> could be used as a shortcut for this:
>
> >>    for __temp in iterable: yield __temp
>
> > How serious were you about that?
>
> Not so much, I haven't thougth enough on it. Looks fine in principle, but  
> yield expressions may be a problem.
>
> --
> Gabriel Genellina

Funnily, there's a patch for py3k to make this work as in your idea.
It's currently being discussed on python-3000 :)

--
Arnaud




More information about the Python-list mailing list