# How to collect keyword arguments in a Dict?

**URL:** <https://discourse.julialang.org/t/how-to-collect-keyword-arguments-in-a-dict/6693>\
**Category:** General Usage\
**Created:** [October 26, 2017, 7:45am UTC](https://discourse.julialang.org/t/how-to-collect-keyword-arguments-in-a-dict/6693 "2017-10-26T07:45:17Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [October 26, 2017, 9:10am UTC](https://discourse.julialang.org/t/how-to-collect-keyword-arguments-in-a-dict/6693/5 "2017-10-26T09:10:10Z")

</div>

Anyway, if you want to do that, the easiest way is to define the Dict first, like in the answer given on SO:

```julia
args = Dict(:a => 3, :b => 4)
foo(;args...)

```

---

_[View the full topic](https://discourse.julialang.org/t/how-to-collect-keyword-arguments-in-a-dict/6693)._
