Author samfrances
Recipients asvetlov, samfrances, yselivanov
Date 2019-06-30.23:55:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561938950.71.0.697852992185.issue37455@roundup.psfhosted.org>
In-reply-to
Content
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())
```
History
Date User Action Args
2019-06-30 23:55:50samfrancessetrecipients: + samfrances, asvetlov, yselivanov
2019-06-30 23:55:50samfrancessetmessageid: <1561938950.71.0.697852992185.issue37455@roundup.psfhosted.org>
2019-06-30 23:55:50samfranceslinkissue37455 messages
2019-06-30 23:55:50samfrancescreate