Message346944
Apologies for the stray unused function in the example. It should have read:
```
import asyncio
async def count():
try:
i = 0
while True:
yield i
i += 1
finally:
print("count() cleanup")
async def double(source):
try:
async for n in source:
yield n * 2
finally:
print("double() cleanup")
async def main():
async for i in double(count()):
if i > 10:
return
print(i)
asyncio.run(main())
``` |
|
Date |
User |
Action |
Args |
2019-06-30 23:55:50 | samfrances | set | recipients:
+ samfrances, asvetlov, yselivanov |
2019-06-30 23:55:50 | samfrances | set | messageid: <1561938950.71.0.697852992185.issue37455@roundup.psfhosted.org> |
2019-06-30 23:55:50 | samfrances | link | issue37455 messages |
2019-06-30 23:55:50 | samfrances | create | |
|