I ran across a strange phenonemon with IronPython (2.7.5). Please take a look at the following example code:
class X(object):
def __eq__(self, other):
print "__eq__"
return False
def foo(self):
return 1
a = X()
print a.foo == a.foo
When run with IronPython the output is:
__eq__
False
I don't understand why the equality operator overload of class X is used (a.foo has type instancemethod, not X).
When using CPython the output is
True
I guess this is a bug in IronPython. Does anyone agree?