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

Class BadSeq

Lib/test/test_functools.py:1087–1089  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1085 self.assertEqual(self.reduce(add, [], 42), 42)
1086
1087 class BadSeq:
1088 def __getitem__(self, index):
1089 raise ValueError
1090 self.assertRaises(ValueError, self.reduce, 42, BadSeq())
1091
1092 # Test reduce()'s use of iterators.

Callers 1

test_reduceMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_reduceMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…