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

Class Ig

Lib/test/test_itertools.py:2142–2149  ·  view source on GitHub ↗

Sequence using iterator protocol defined with a generator

Source from the content-addressed store, hash-verified

2140 return v
2141
2142class Ig:
2143 'Sequence using iterator protocol defined with a generator'
2144 def __init__(self, seqn):
2145 self.seqn = seqn
2146 self.i = 0
2147 def __iter__(self):
2148 for val in self.seqn:
2149 yield val
2150
2151class X:
2152 'Missing __getitem__ and __iter__'

Callers 1

LFunction · 0.70

Calls

no outgoing calls

Tested by 1

LFunction · 0.56