-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
mechanism for obtaining local variable names and values #29366
Comments
Is this different from |
|
This would be super useful. I see some code here but does it actually exist in any version of Julia? I can't seem to find it in Julia 1.0.3. @Locals is not defined in Base. |
It exists in the downloadable release candidate for julia 1.1.0. |
It could be useful for debugging to be able to easily get the names and values of all variables in scope, e.g. so you don't have to manually write them all in a call to
@show
. This could be provided as a macro@locals
(though needs to be implemented specially in lowering, since the set of variables in scope is not available during macro expansion), returning a dictionary, similar tolocals()
in python: https://docs.python.org/3/library/functions.html#localsThoughts?
The text was updated successfully, but these errors were encountered: