is operator

Terry Reedy tjreedy at udel.edu
Tue Mar 11 00:20:44 EDT 2008


<castironpi at gmail.com> wrote in message 
news:b61e001a-3a41-4a35-ab3a-546e453d8d69 at b64g2000hsa.googlegroups.com...
| What is the notion of equal defined for functions?

Isness.  The developers did not see sufficient reason to refine it further 
by comparing all the attributes, including the code object.  But there has 
just been a discussion on pydev about the notion of equality for bound 
methods.

Isness is also the default notion of equality for user-class instances, but 
in this latter case, an explicit and different __eq__ method can be given.

tjr







More information about the Python-list mailing list