MCPcopy Index your code
hub / github.com/python/cpython / BadEq

Class BadEq

Lib/test/test_dict.py:170–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168 self.assertRaises(TypeError, d.__getitem__)
169
170 class BadEq(object):
171 def __eq__(self, other):
172 raise Exc()
173 def __hash__(self):
174 return 24
175
176 d = {}
177 d[BadEq()] = 42

Callers 2

test_getitemMethod · 0.70

Calls

no outgoing calls

Tested by 2

test_getitemMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…