Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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[]
9
def
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
18
if
__name__ ==
'__main__'
:
Callers
1
yield_delegate_fix.py
File · 0.70
Calls
1
do_yield
Function · 0.70
Tested by
no test coverage detected