[Python-ideas] comparison of operator.itemgetter objects

Terry Reedy tjreedy at udel.edu
Thu Apr 5 21:14:28 CEST 2012

On 4/5/2012 12:33 PM, Jim Jewett wrote:

> Why not?  If you really care about identity for a lambda function,

A 'lambda function' is simply a function whose .__name__ attribute is 
"<lambda>". There is no difference otherwise. Hence cases '(a) function' 
and '(d) lambda function' (in snipped portion) are the same class and

> I would support a change to function.__eq__ (which would fall through
> to lambda)

'falling through' cannot happen as there is nothing other to fall 
through to.

Terry Jan Reedy

More information about the Python-ideas mailing list