What's do list comprehensions do that generator expressions don't?

Jeremy Bowers jerf at jerf.org
Tue Apr 26 00:25:01 EDT 2005


On Mon, 25 Apr 2005 23:00:57 -0500, Mike Meyer wrote:
> Why do we have to wait for Python 3.0 for this? Couldn't list
> comprehensions and generator expression be unified without breaking
> existing code that didn't deserve to be broken?

We don't; my mentioning 3.0 was just in reference to a previous comment.
In fact it'll probably happen sooner than then, I just have no direct
knowledge. (I know some people were talking about creating iterators that
know how many things they contain, which is the critical optimization, but
I don't know if that's gotten anywhere; I don't track the dev list as it
is too much traffic for my already strained email client :-) )



More information about the Python-list mailing list