[Python-Dev] PEP 289: Generator Expressions

Raymond Hettinger python at rcn.com
Tue Oct 28 01:40:57 EST 2003


> After seeing "iterator expressions" I came up wit "generator
> expressions" and decided I liked that better.  Around the same time
> Tim Peters wrote a post where he proposed "generator expressions"
> independently:
> 
> http://mail.python.org/pipermail/python-dev/2003-October/039186.html
> 
> Trying to rationalize my own gut preference, I think I like "generator
> expressions" better than "iterator expressions" because there are so
> many other expressions that yield iterators (e.g. iter(x) comes to
> mind :-).  Just like generator functions are one specific cool way of
> creating an iterator, generator expressions are another specific cool
> way, and as a bonus, they're related in terms of implementation (and
> that certainly reflects on corners of the semantics, so I don't think
> we should try to hide this as an implementation detail).

I'm convinced.



Raymond




More information about the Python-Dev mailing list