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

Class IterGen

Lib/test/seq_tests.py:38–45  ·  view source on GitHub ↗

Sequence using iterator protocol defined with a generator

Source from the content-addressed store, hash-verified

36 return v
37
38class IterGen:
39 'Sequence using iterator protocol defined with a generator'
40 def __init__(self, seqn):
41 self.seqn = seqn
42 self.i = 0
43 def __iter__(self):
44 for val in self.seqn:
45 yield val
46
47class IterNextOnly:
48 'Missing __getitem__ and __iter__'

Callers 1

itermultiFunction · 0.85

Calls

no outgoing calls

Tested by 1

itermultiFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…