[Python-Dev] PEP 289 - Generator Expressions - Let's Move Forward

Phillip J. Eby pje at telecommunity.com
Fri Apr 23 15:59:26 EDT 2004

At 03:41 PM 4/23/04 -0400, Jeremy Hylton wrote:

>That leads me to wonder what exactly the rationale for generator
>expressions is.  The PEP says that "time, clarity, and memory are
>conserved by using an generator expression" but I can only see how
>memory is conserved.  That is, I don't find them any easier to read than
>list comprehensions and I don't understand the performance implications
>very well.  It's not obvious to me that their faster.

Alex Martelli previously posted some tests that showed them to be quite a 
bit faster for large lists.

More information about the Python-Dev mailing list