Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A(object):
- def __init__(self, a):
- self.a = a
- def __ne__(self, other):
- return self.a != other.a
- A(3) != A(3) # produces False
- A(3) != A(2) # produces True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement