How to pass members of a dict to a function
<p>Suppose I have a function that I do not control that looks something like the following:</p>

<pre><code>def some_func(foo, bar, bas, baz):
    do_something()
    return some_val
</code></pre>

<p>Now I want to call this function passing elements from a dict that contains keys that are identical to the arguments of this function.  I could do something like:</p>

<pre><code>some_func(foo=mydict['foo'],
          bar=mydict['bar'],
          bas=mydict['bas'],
          baz=mydict['baz'])
</code></pre>

<p>Is there some elegant way I could take advantage of the fact that the keys match the parms to do this less verbosely?  I know I could pass the whole dict, but let's say I either don't want to or can't change the function to accept a single dict rather than the individual arguments.</p>

<p>Thanks,
Jerry</p>
