[Python-Dev] PEP 289: Generator Expressions

Raymond Hettinger python at rcn.com
Mon Oct 27 16:13:26 EST 2003


[GvR]
> Raymond, please take this to c.l.py for feedback!  Wear asbestos. :-)
> 
> I'm sure there will be plenty of misunderstandings in the discussion
> there.  If these are due to lack of detail or clarity in the PEP, feel
> free to update the PEP.  If there are questions that need us to go
> back to the drawing board or requiring BDFL pronouncement, take it
> back to python-dev.

The asbestos wasn't needed :-)

Overall the pep is being well received.  The discussion has been
uncontentious and light (around 50-55 posts).  

Several people initially thought that lambda should be part of the
syntax, but other respondants quickly laid that to rest.  

Many posters were succinctly positive:  "+1" or "great idea". 

One skeptical response came from someone who didn't like list
comprehensions either.  Alex quickly pointed out that they have been
"wildly successful" for advanced users and newbies alike.  

One poster counter-suggested a weird regex style syntax for embedding
Perl expressions.  The newsgroup was very kind and no one called him
wacko :-)

There was occasional discussion about the parentheses requirement but
that was quickly settled also.  One idea that had some merit was to not
require the outer parentheses for a single expression on the rhs of an
assignment:

    g = (x**2 for x in range(10))   # maybe the outer parens are not
needed

The discussion is winding down and there are no unresolved questions. 


Raymond Hettinger




More information about the Python-Dev mailing list