better lambda support in the future?

Robin Becker robin at SPAMREMOVEjessikat.fsnet.co.uk
Sat Dec 18 16:38:10 CET 2004


Terry Reedy wrote:
> "Jp Calderone" <exarkun at divmod.com> wrote in message 
> news:20041218001106.1029.2092913511.divmod.quotient.12461 at ohm...
> 
>>On Fri, 17 Dec 2004 18:16:08 -0500, Terry Reedy <tjreedy at udel.edu> wrote:
.....
> 
> 
> For one-off uses not eligible for lambda treatment, where you really do not 
> care about the name, use the same name, such as 'f', over and over, or a 
> series such as f1, f2, ,,, or f,g,h.  I have done all three in interactive 
> explorations.
> 
> Terry J. Reedy
> 
> 
> 
I disagree, the existence of the name itself is information as is lack 
of existence. If the name is absent there is an implication that it not 
required. An unnecessary name is visual noise.

The thing that is probably a bit stupid about lambdas (I admit to having 
done this) is

x = lambda a,b,c:.......

which could just as well be written

def x(a,b,c):return .........

with only a few extra characters.
-- 
Robin Becker



More information about the Python-list mailing list