As an extension to the answer posted by @Bas, I would suggest to add the kwargs arguments (variable length keyword arguments) as the second parameter to the function
>>> def f (a=None, **kwargs):
print a
>>> dct2 = {"a":"Foo", "b":"Bar"}
>>> f(**dct2)
Foo
This would necessarily suffice the case of
- to just ignore any keys that are not parameter names
- However, it lacks the default values of parameters, which is a nice feature that it would be nice to keep