[Python-3000] lambda

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Mar 27 08:13:38 CET 2008


Leif Walsh wrote:
> On Wed, Mar 26, 2008 at 7:34 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> 
>>   x, y => x + y
> 
> If something like this is adopted, I plead that := is chosen.

No, that would be massively confusing, since := is
an assignment operator in some languages, notably
Pascal.

The => is meant to suggest a mapping, and it resembles
notation used in mathematics and some functional
languages to denote a function.

For example, Haskell, if I remember rightly, would
write this as

   \(x, y) -> x + y

-- 
Greg


More information about the Python-3000 mailing list