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

Class SequenceWithoutALength

Lib/test/test_builtin.py:2175–2180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2173 # result list when one of its arguments doesn't say how long it is.
2174 # A MemoryError is the most likely failure mode.
2175 class SequenceWithoutALength:
2176 def __getitem__(self, i):
2177 if i == 5:
2178 raise IndexError
2179 else:
2180 return i
2181 self.assertEqual(
2182 list(zip(SequenceWithoutALength(), range(2**30))),
2183 list(enumerate(range(5)))

Callers 1

test_zipMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_zipMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…