title: How does one ignore unexpected keyword arguments passed to a function?
body: <p>Suppose I have some function, <code>f</code>:</p>
  
  <pre><code>def f (a=None):
      print a
  </code></pre>
  
  <p>Now, if I have a dictionary such as <code>dct = {"a":"Foo"}</code>, I may call <code>f(**dct)</code> and get the result <code>Foo</code> printed.</p>
  
  <p>However, suppose I have a dictionary <code>dct2 = {"a":"Foo", "b":"Bar"}</code>.  If I call <code>f(**dct2)</code> I get a </p>
  
  <pre><code>TypeError: f() got an unexpected keyword argument 'b'
  </code></pre>
  
  <p>Fair enough.  However, is there anyway to, in the definition of <code>f</code> or in the calling of it, tell Python to just ignore any keys that are not parameter names?  Preferable a method that allows defaults to be specified.</p>