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 gvanrossum
Recipients asvetlov, ericvw, gvanrossum, levkivskyi, pablogsal, serhiy.storchaka, yselivanov
Date 2018-05-14.22:06:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAP7+vJJHutx5nA60TGdyjestYbsJAohPmvx7GsyJrqa0zRo1Yg@mail.gmail.com>
In-reply-to <1526333338.82.0.682650639539.issue33346@psf.upfronthosting.co.za>
Content
Is there any problem that is solved by allowing this example? The asymmetry
with using [...async for...] in the same position (which is not allowed)
worries me. Do you have a real use case where it's clearer to write an
async generator expression instead of a nested async function?

def foo():
    async def inner():
        async for i in ai:
            yield i
    return inner

I would encourage you to think about various ways of nesting async
generator expressions and comprehensions to see if you can poke a hole in
the design.
History
Date User Action Args
2018-05-14 22:06:04gvanrossumsetrecipients: + gvanrossum, ericvw, asvetlov, serhiy.storchaka, yselivanov, levkivskyi, pablogsal
2018-05-14 22:06:04gvanrossumlinkissue33346 messages
2018-05-14 22:06:04gvanrossumcreate