Style question on recursive generators
Andrea Griffini
agriff at tin.it
Tue Oct 19 01:30:26 EDT 2004
On Tue, 19 Oct 2004 01:23:37 +0000, Dima Dorfman
<d+pylist at nospamplease.trit.org> wrote:
>I find myself writing a lot of recursive generators, and a while ago I
>implemented this:
>
> yield *other
>
>to mean:
>
> for x in other:
> yield x
>
>No new keywords, and the asterisk is already used for a similar
>purpose (iterator expansion) in the function call syntax.
>
>Thoughts? "Neat!" or "Yuck!"?
An ignored "Neat" for me
Andrea
More information about the Python-list
mailing list