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

Class BadSeq

Lib/test/test_builtin.py:1158–1162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1156 filter(identity, Squares(5))
1157 self.assertRaises(TypeError, filter)
1158 class BadSeq(object):
1159 def __getitem__(self, index):
1160 if index<4:
1161 return 42
1162 raise ValueError
1163 self.assertRaises(ValueError, list, filter(lambda x: x, BadSeq()))
1164 def badfunc():
1165 pass

Callers 7

test_filterMethod · 0.70
test_lenMethod · 0.70
test_mapMethod · 0.70
test_maxMethod · 0.70
test_minMethod · 0.70
test_sumMethod · 0.70
test_zipMethod · 0.70

Calls

no outgoing calls

Tested by 7

test_filterMethod · 0.56
test_lenMethod · 0.56
test_mapMethod · 0.56
test_maxMethod · 0.56
test_minMethod · 0.56
test_sumMethod · 0.56
test_zipMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…