blob: 9bc6871a021fe628cb10a8afbdec2e5d647b80cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env python2
class A:
def __init__(self, a):
self.a = a
def __cmp__(self, b):
if self.a==b.a: return 0
return 1
a = A("a")
b = A("b")
c = A("a")
print a == c
|