How to send a dictionary to a function that accepts **kwargs?

python

Solution

Just use `func(**some_dict)` to call it.

This is documented on section 4.7.4 of python tutorial.

Note that the same `dict` is not passed into the function. A new copy is created, so `some_dict is not kwargs`.

Problem

I have a function that accepts wildcard keyword parameters: ``` def func(**kargs): doA doB ``` How do I send it a dictionary?

Original source

Related problems