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

Function _gen3

Lib/test/test_generators.py:1958–1977  ·  view source on GitHub ↗
(i)

Source from the content-addressed store, hash-verified

1956 # gen's use.
1957
1958 def _gen3(i):
1959 assert i < n and (n-i) % 3 == 0
1960 ip1, ip2, ip3 = i+1, i+2, i+3
1961 g, g1, g2 = gs[i : ip3]
1962
1963 if ip3 >= n:
1964 # These are the last three, so we can yield values directly.
1965 for values[i] in g():
1966 for values[ip1] in g1():
1967 for values[ip2] in g2():
1968 yield values
1969
1970 else:
1971 # At least 6 loop nests remain; peel off 3 and recurse for the
1972 # rest.
1973 for values[i] in g():
1974 for values[ip1] in g1():
1975 for values[ip2] in g2():
1976 for x in _gen3(ip3):
1977 yield x
1978
1979 for x in gen(0):
1980 yield x

Callers 1

genFunction · 0.85

Calls 2

g1Function · 0.85
gFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…