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

import module in closure does not register module as a local variable def (with closures enabled). #8

Closed
NiklasRosenstein opened this issue Mar 18, 2022 · 1 comment
Assignees
Labels
type: bug Something isn't working

Comments

@NiklasRosenstein
Copy link
Owner

Example:

foo = {
  import pdb
  pdb.set_trace()
}

Transpiles to

@__closure__.child
def _closure_1(__closure__, self, *arguments, **kwarguments):
    import pdb
    __closure__['pdb'].set_trace()  #< This should be just `pdb`
__closure__['foo'](_closure_1)
@NiklasRosenstein NiklasRosenstein added the type: bug Something isn't working label Mar 18, 2022
@NiklasRosenstein NiklasRosenstein self-assigned this Mar 18, 2022
@NiklasRosenstein
Copy link
Owner Author

This was implemented in few patches ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant