Draft Pep (was: Re: Let's Talk About Lambda Functions!)

Duncan Booth duncan at NOSPAMrcp.co.uk
Tue Aug 6 04:54:54 EDT 2002


Hans Nowak <wurmy at earthlink.net> wrote in
news:3D4F4CD6.2060609 at earthlink.net: 

>>> >>> define_twice().func_name
>>>'_twice'
>> 
>> 
>> That's not a binding.  
> 
> Maybe not, but it has a name, and can therefore hardly be called
> "anonymous". Sure, the function is not bound to any name in the
> current local or global namespaces. But it does have a name.

But using that argument, lambda doesn't give you an anonymous function 
either as you still have a name:

>>> f = lambda x:x
>>> print f.func_name
<lambda>
>>> 

-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?



More information about the Python-list mailing list