How to get default values of a functions kwargs

I have a function f:

function f(; a=1, b=2, c=3)
    return 1
end

I can get the names of its kwargs using:

Base.kwarg_decl.(methods(f))[1]

Is there any way to get the default values of those kwargs?

1 Like