title: Use **kwargs both in function calling and definition
body: <p>Suppose I have a function <code>get_data</code> which takes some number of keyword arguments. Is there some way I can do this </p>
  
  <pre><code>def get_data(arg1, **kwargs):
      print arg1, arg2, arg3, arg4
  
  arg1 = 1
  data['arg2'] = 2 
  data['arg3'] = 3 
  data['arg4'] = 4 
  
  get_data(arg1, **data)
  </code></pre>
  
  <p><em>So the idea is to avoid typing the argument names in both function calling and function definition. I call the function with a dictionary as argument and the keys of the dictionary become local variables of function and their values are the dictionary values</em></p>
  
  <p>I tried the above and got error saying <code>global name 'arg2' is not defined</code>. I understand I can change the <code>locals()</code> in the definition of <code>get_data</code> to get the desired behavior.</p>
  
  <p>So my code would look like this</p>
  
  <pre><code>def get_data(arg1, kwargs):
      locals().update(kwargs)
      print arg1, arg2, arg3, arg4
  
  arg1 = 1
  data['arg2'] = 2 
  data['arg3'] = 3 
  data['arg4'] = 4 
  
  get_data(arg1, data)
  </code></pre>
  
  <p>and it wouldn't work too. Also cant I achieve the behavior without using <code>locals()</code>?</p>