python gripes survey

Jeff Epler jepler at
Mon Aug 25 04:08:43 CEST 2003

On Sun, Aug 24, 2003 at 05:41:35PM -0700, Patrick Lioi wrote:
> I would also like to see what would probably end up being called
> "generator comprehensions".  That is definitely not my own idea, but
> for the life of me I can't remember where I first heard about it. 
> Imagine being able to throw the yield keyword into a list
> comprehension syntax in order to take advantage of list
> comprehension's in a memory-efficient way, something kinda like this:
> foo = [yield i*i for i in xrange(100)]

I also think that this would be a nice thing to have.  I think that one
barrier to it was the lack of an implementation.  I don't remember what
other objections were recorded in the PEP mentioned in another followup.


More information about the Python-list mailing list