> > And finally, can this code run on current stable version? > No.
For future reference (i.e. when 0.5 is released), you can run: Base.kwarg_decl(methods(f).ms[1].sig, typeof(methods(f).mt.kwsorter)) On Wed, Jul 6, 2016 at 5:38 PM, Leonardo <[email protected]> wrote: > Thanks, I've found function: > kwarg_decl(sig::ANY, kwtype::DataType) > in develop version (not stable version 0.4.6) > > But I cannot understand (also following code flow) what is kwtype > parameter and how kwarg_decl can be called. > > And finally, can this code run on current stable version? > > Many thanks again > > Leonardo > > > > Il 06/07/2016 15:32, Isaiah Norton ha scritto: > >> The implementation is not trivial to follow, but have a look at >> `kwarg_decl` in `base/methodshow.jl`. >> >> This might be a reasonable thing to have as a helper function, if you >> want to open a GitHub issue to discuss. >> >> (Be warned: you will pay a severe performance penalty if you try to use >> reflection for some kind of runtime meta-dispatch) >> >> On Wed, Jul 6, 2016 at 1:41 AM, Leonardo <[email protected] >> <mailto:[email protected]>> wrote: >> >> There is a way to list all keyword arguments defined by a function f? >> (a sort of reflection?) >> >> e.g.; >> >> /having >> /function f(i::Int; a::AbstractString=0, b::Float64=0.0) >> ... >> end >> >> /how to return a, b from f? >> / >> >> Many thanks in advance >> >> Leonardo >> >> >>
