Skip to content

Commit 473229a

Browse files
committed
Coroutine
1 parent 66ee9ee commit 473229a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,14 +1601,14 @@ def reader(target):
16011601
@coroutine
16021602
def adder(target):
16031603
while True:
1604-
item = (yield)
1605-
target.send(item + 100)
1604+
value = (yield)
1605+
target.send(value + 100)
16061606

16071607
@coroutine
16081608
def printer():
16091609
while True:
1610-
item = (yield)
1611-
print(item)
1610+
value = (yield)
1611+
print(value)
16121612

16131613
reader(adder(printer())) # 100, 101, ..., 109
16141614
```

0 commit comments

Comments
 (0)