Guido van Rossum <gu...@python.org> added the comment: 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33346> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com