Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async for in list comprehensions and generators #10

Open
rocky opened this issue Dec 16, 2019 · 0 comments
Open

async for in list comprehensions and generators #10

rocky opened this issue Dec 16, 2019 · 0 comments

Comments

@rocky
Copy link

rocky commented Dec 16, 2019

Consider this Python source:

# from 3.7 test_asyncgen.py
def make_arange(n):
    # This syntax is legal starting with Python 3.7
    return (i * 2 async for i in n)

async def run(m):
    return [i async for i in m]

When compiled to bytecode and decompiled with unpyc7.py I get:

def make_arange(n):
    return n

async def run(m):
    return await m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant