# Finding possible keyword arguments

**URL:** <https://discourse.julialang.org/t/finding-possible-keyword-arguments/40752>\
**Category:** Internals & Design\
**Tags:** keyword-arguments\
**Created:** [June 4, 2020, 6:24pm UTC](https://discourse.julialang.org/t/finding-possible-keyword-arguments/40752 "2020-06-04T18:24:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![fgerick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fgerick/32/13228_2.png) [@fgerick](https://discourse.julialang.org/u/fgerick)\
**Post date:** [June 4, 2020, 6:24pm UTC](https://discourse.julialang.org/t/finding-possible-keyword-arguments/40752/1 "2020-06-04T18:24:27Z")

</div>

This is inspired by [this post](https://discourse.julialang.org/t/julia-among-the-most-loved-languages/40423/9):  
Is there a way of finding allowed keyword arguments for a function (e.g. `bar`) that passes its `kwargs` to another function, such as

```julia
foo(;a=2,b=3) = a+b
bar(;kwargs...) = foo(; kwargs...)

```

so that I can find that `kwargs` should be `a` or `b` ? This would certainly nice for a lot of documentation. I would love to have

```julia
julia> @doc bar
  No documentation found.

  bar is a Function.

  # 1 method for generic function "bar":
  [1] bar(; a, b) in Main ...

```

or

```julia
julia> allowedkwargs(bar)
(:a,:b)

```

I know it can get awfully complicated, but nevertheless would be pretty handy in many cases.

---

_[View the full topic](https://discourse.julialang.org/t/finding-possible-keyword-arguments/40752)._
