kuroko/test/testEqInvert.krk

10 lines
220 B
Python

class Foo():
def __init__(self, tag):
self.tag = tag
def __eq__(self, other):
print(self.tag,'==',other.tag)
return NotImplemented
print(Foo('a') == Foo('b'))
print(Foo('a') != Foo('b'))