Suppose I have the following program:
class A(object): def __eq__(self, other): return True a0 = A() a1 = A() print a0 != a1
If you started it with Python, the output will be True . My question is:
- The
__ne__ method __ne__ not implemented, does Python work by default? - If Python uses the default method to determine whether two objects are equal or not, should it not call
__eq__ and then deny the result?
source share