[Python-Dev] Re: "groupby" iterator

Zack Weinberg zack at codesourcery.com
Tue Dec 2 19:51:26 EST 2003

Greg Ewing <greg at cosc.canterbury.ac.nz> writes:

> I think I like the idea of optimising lambda, but that doesn't do
> anything for the readability. So, how about a nicer syntax for lambda?
> Maybe along the lines of
>    x -> x.something
> A bonus of introducing a new lambda syntax is that it would provide
> the opportunity to give it early-binding semantics for free variables,
> like generator expressions. The old lambda would have to be kept
> around for a while for programs relying on the old semantics, but it
> could be deprecated, and removed in 3.0.

If you're going to mess with lambda at all, please try to come up with
a way for it not to be limited to a single expression.  I tried to do
this last summer and couldn't get rid of grammar ambiguities.


More information about the Python-Dev mailing list