What's do list comprehensions do that generator expressions don't?
Terry Reedy
tjreedy at udel.edu
Tue Apr 26 13:22:28 EDT 2005
"Mike Meyer" <mwm at mired.org> wrote in message
> The question under these circumstances is then: do you want bare
> genexp to mean something? Right now, it's a syntax error. But there's
> no reason you couldn't have:
>
> y = x for x in stuff
>
> assign a generator object to y.
Since this was considered, there is a reason why we don't have this. As I
remenber, but vaguely, Guido's reasoning was both stylistic and technical,
but you'd have to check the archives for more.
Terry J. Reedy
More information about the Python-list
mailing list