[issue1617161] Instance methods compare equal when their self's are equal

Armin Rigo report at bugs.python.org
Sun Mar 9 13:15:06 CET 2008


Armin Rigo <arigo at users.sourceforge.net> added the comment:

My mistake, you are right.  I forgot about one of the many types that
CPython uses internally for built-in methods.  Indeed:

    >>> [].index == [].index
    False
    >>> [].__add__ == [].__add__
    True

I can fix this so that the answer is True in all cases; alternatively,
considering Frank Niessink's original issue, we could bring this
discussion to python-dev and decide what the correct behavior should be
and implement it consistently for all method types.

_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1617161>
_____________________________________


More information about the Python-bugs-list mailing list