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 zach.ware
Recipients cannedrag, yselivanov, zach.ware
Date 2017-10-20.23:31:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1508542273.57.0.213398074469.issue31832@psf.upfronthosting.co.za>
In-reply-to
Content
Your async listcomp must also be defined within a coroutine to turn `async` into a keyword in 3.6.  The following is far from best practice (don't do this, I don't know what I'm doing! :), but at least it compiles and shows that it works:

async def arange(n):
    for i in range(n):
        yield i

async def alistcomp():
    return [i async for i in arange(10)]

try:
    next(alistcomp().__await__())
except StopIteration as e:
    value = e.value

print(value)
History
Date User Action Args
2017-10-20 23:31:13zach.waresetrecipients: + zach.ware, yselivanov, cannedrag
2017-10-20 23:31:13zach.waresetmessageid: <1508542273.57.0.213398074469.issue31832@psf.upfronthosting.co.za>
2017-10-20 23:31:13zach.warelinkissue31832 messages
2017-10-20 23:31:13zach.warecreate