Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. class A(object):
  2. def __init__(self, a):
  3. self.a = a
  4.  
  5. def __ne__(self, other):
  6. return self.a != other.a
  7.  
  8. A(3) != A(3) # produces False
  9. A(3) != A(2) # produces True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement