| 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))) |