I can use `getfield(Module, :functionname)` to grab a variable in `Module`, e.g. `

I can use getfield(Module, :functionname) to grab a variable in Module, e.g. Main: but can I do the same for a local variable in a function?

Note that the original poster on Slack cannot see your response here on Discourse. Consider transcribing the appropriate answer back to Slack, or pinging the poster here on Discourse so they can follow this thread.
(Original message :slack:) (More Info)

1 Like

Answer from Chris de Graaf:

Check out Base.@locals , I think that’s the best you’ll find

1 Like