This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author John Belmonte
Recipients Dima.Tisnek, Eric Wieser, JelleZijlstra, John Belmonte, davide.rizzo, jab, jmehnle, rb, yselivanov
Date 2020-11-05.12:03:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1604577802.86.0.418831834919.issue31861@roundup.psfhosted.org>
In-reply-to
Content
Adding this would be a nice compliment to aclosing(), which was already merged for 3.10.

Otherwise, witness the ugliness of using aclosing() with an async iterable object:

    async with aclosing(foo.__aiter__()) as agen:
        async for item in agen:
            ...

I'd like:

    async with aclosing(aiter(foo)) as agen:
        async for item in agen:
            ...
History
Date User Action Args
2020-11-05 12:03:22John Belmontesetrecipients: + John Belmonte, rb, jab, davide.rizzo, jmehnle, Dima.Tisnek, yselivanov, JelleZijlstra, Eric Wieser
2020-11-05 12:03:22John Belmontesetmessageid: <1604577802.86.0.418831834919.issue31861@roundup.psfhosted.org>
2020-11-05 12:03:22John Belmontelinkissue31861 messages
2020-11-05 12:03:22John Belmontecreate