[Python-Dev] Let's just keep lambda (original) (raw)
Phillip J. Eby pje at telecommunity.com
Wed Feb 8 19:16:16 CET 2006
- Previous message: [Python-Dev] Let's just *keep* lambda
- Next message: [Python-Dev] Let's just *keep* lambda
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 10:07 AM 2/8/2006 -0800, Guido van Rossum wrote:
On 2/8/06, Patrick Collison <patrick at collison.ie> wrote: > And to think that people thought that keeping "lambda", but changing > the name, would avoid all the heated discussion... :-)
Note that I'm not participating in any attempts to "improve" lambda. Just about the only improvement I'd like to see is to add parentheses around the arguments, so you'd write lambda(x, y): x**y instead of lambda x, y: x**y.
lambda(x,y) looks like a function call until you hit the ':'; we don't usually have keywords that work that way.
How about (lambda x,y: x**y)? It seems like all the recently added constructs (conditionals, yield expressions, generator expressions) take on this rather lisp-y look. :)
Or, if you wanted to eliminate the "lambda" keyword, then "(from x,y return x**y)" could be a "function expression", and it looks even more like most of the recently-added expression constructs.
Well, actually, I guess to mirror the style of conditionals and genexps more closely, it would have to be something like "(return xy from x,y)" or "(xy from x,y)".
Ugh. Never mind, let's just leave it the way it is today. :)
- Previous message: [Python-Dev] Let's just *keep* lambda
- Next message: [Python-Dev] Let's just *keep* lambda
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]