-
Notifications
You must be signed in to change notification settings - Fork 28
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
free variables in-line python #205
Labels
enhancement
new features
type: core
core functionality
type: step
steps
up next
features that are more or less on the TODO list
Projects
Comments
yaythomas
added a commit
that referenced
this issue
Dec 7, 2020
yaythomas
added a commit
that referenced
this issue
Dec 25, 2020
yaythomas
added a commit
that referenced
this issue
Dec 25, 2020
…pace. See docs/adr/0001-namespace-on-eval-and-exec.md.closes #205.
yaythomas
added a commit
that referenced
this issue
Dec 25, 2020
yaythomas
added a commit
that referenced
this issue
Dec 25, 2020
…pace. See docs/adr/0001-namespace-on-eval-and-exec.md.closes #205.
yaythomas
added a commit
that referenced
this issue
Dec 26, 2020
yaythomas
added a commit
that referenced
this issue
Dec 26, 2020
…pace. See docs/adr/0001-namespace-on-eval-and-exec.md.closes #205.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
new features
type: core
core functionality
type: step
steps
up next
features that are more or less on the TODO list
For both
!py
-strings andpypyr.steps.py
, add support for free variables.This is less edge case than it might sound: it comes up with very unfriendly and not easily understood errors when you attempt to use nested comprehensions:
[(x, y) for x in list1 for y in list2]
. In this case,list2
will not resolve even if it is in context, leading to much WTF-ing for something that looks like it should work and in fact does work when you run it against the normal python compiler.These pypyr inline python functions rely on
eval
andexec
under the hood. Both of these, although taking both aglobals
andlocals
argument, only resolve free variables againstglobals
.The text was updated successfully, but these errors were encountered: