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

@compile_fun does not recurse through imported names for now #52

Open
smarie opened this issue Mar 23, 2020 · 0 comments
Open

@compile_fun does not recurse through imported names for now #52

smarie opened this issue Mar 23, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@smarie
Copy link
Owner

smarie commented Mar 23, 2020

These names are available in co_names. For example below the dedent symbol is not compiled.

from textwrap import dedent

@compile_fun
def foo():
    return dedent("   hoho")

Unfortunately, handling this comes with many side effects including compilation order, appropriate propagation or non-propagation of globals(), locals().

Since @compile_fun was initially just a fun experiment to apply compile easily, as of now I do not plan to make this work. Contributions welcome - if you find that this is actually worth it ! :)

@smarie smarie added the bug Something isn't working label Mar 23, 2020
smarie pushed a commit that referenced this issue Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant