Well, yes, if you have a handle to the function you can just look at the AST as in the last part of the answer. The backtrace hack is just for getting the handle "inside" the function.
On Sat, Nov 7, 2015 at 9:23 AM, Eric Jang <[email protected]> wrote: > It does look like there is a (shorter) way to extract the function > arguments though, without use of backtrace(): call string(methods(fn)) and > parse the string. > Of course this still assumes that there is only 1 Method in the > MethodTable. > > > On Saturday, November 7, 2015 at 9:20:07 AM UTC-5, Eric Jang wrote: >> >> Ah, silly me - I had asked that question awhile ago and completely forgot >> about it. >> >> >> On Friday, November 6, 2015 at 11:19:13 PM UTC-5, Isaiah wrote: >>> >>> >>> http://stackoverflow.com/questions/32928524/julia-introspection-get-name-of-variable-passed-to-function/32936088#32936088 >>> >>> On Fri, Nov 6, 2015 at 4:32 PM, Eric Jang <[email protected]> wrote: >>> >>>> Is it possible to get parameter names to a function? >>>> >>>> For instance, >>>> >>>> function myfunc(x,y,z) >>>> x+y+z >>>> end >>>> >>>> >>>> given the above function, I want to recover ["x","y","z"] >>>> >>> >>>
