title: How to return **kwargs with double star/asterisk in Python?
body: <p>Say I have following functions:</p>
  <pre class="lang-py prettyprint-override"><code>def f(**kwargs):
      for key in kwargs.keys():
          print(key + ': ' + str(kwargs[key]))
  
  def make_kwargs():
      # My example implementation here
      params = {'a' : 1, 'b' : 2}
      return params # Here is the part I don't know how to do
  </code></pre>
  <p>And the functions has to be called in the following way:</p>
  <pre class="lang-py prettyprint-override"><code>f(make_kwargs())
  </code></pre>
  <p>However, this will return me the <strong>TypeError</strong>:</p>
  <blockquote>
  <p>TypeError: f() takes 0 positional arguments but 1 was given</p>
  </blockquote>
  <p>I tried:</p>
  <pre class="lang-py prettyprint-override"><code>return **params
  </code></pre>
  <p>But the syntax is invalid.</p>
  <p>Say I cannot modify function <code>f()</code> and the way it is called (<code>f(make_kwargs())</code>). The only part I can modify is how I implement <code>make_kwargs()</code>. I wonder if there's a way to do that?</p>