Debian Codegraph @

src/test/python/fixtures/hasheqstr.py

raw symbols SCIP
1 class Simple(object):
2 def __init__(self, v):
3 self._v = v
4
5 def __str__(self):
6 return "Simple: " + str(self._v)
7
8 def getValue(self):
9 return self._v
10
11 class HashSimple(object):
12 def __init__(self, v):
13 self._v = v
14
15 def __str__(self):
16 return "HashSimple: " + str(self._v)
17
18 def getValue(self):
19 return self._v
20
21 def __hash__(self):
22 return hash(self._v)
23
24 def __eq__(self, other):
25 if isinstance(other, self.__class__):
26 return self._v == other._v
27 else:
28 return False # Java can't support NotImplemented
29