[Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

Nick Coghlan ncoghlan at gmail.com
Sat Jun 18 01:33:28 CEST 2005


Guido van Rossum wrote:
>>Recommend accepting just the basic PEP which only targets simple,
>>obvious cases.  The discussed extensions are unattractive and should be
>>skipped.
> 
> 
> -1. The "unary colon" looks unPythonic to me.
> 

Step 1 would be to require parentheses around the whole thing (ala 
generator expressions) to make it easier to see where the deferred 
expression ends.

But all my use cases that I can think off the top of my head involve 
'sorted', where it wouldn't help at all because of the need for an 
argument.

So I'd rather see a serious discussion regarding giving lambdas a more 
Pythonic syntax in general, rather than one that only applied to the 
'no-argument' case [1]

Cheers,
Nick.

[1] http://wiki.python.org/moin/AlternateLambdaSyntax
The 'expression-before-args' version using just the 'from' keyword is 
still my favourite.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.blogspot.com


More information about the Python-Dev mailing list