MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / f

Function f

17-it-generator/yield_delegate_fix.py:9–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7
8# tag::YIELD_DELEGATE_FIX[]
9def f():
10 def do_yield(n):
11 yield n
12 x = 0
13 while True:
14 x += 1
15 yield from do_yield(x)
16# end::YIELD_DELEGATE_FIX[]
17
18if __name__ == '__main__':

Callers 1

Calls 1

do_yieldFunction · 0.70

Tested by

no test coverage detected