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

Method intersection

Lib/test/test_dictviews.py:98–99  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

96
97 class CustomSet(set):
98 def intersection(self, other):
99 return CustomSet(super().intersection(other))
100
101 self.assertEqual(d1.keys() & d1.keys(), {'a', 'b'})
102 self.assertEqual(d1.keys() & d2.keys(), {'b'})

Calls 2

CustomSetClass · 0.85
superClass · 0.85

Tested by

no test coverage detected