Hi, is to possible to "pack" arguments in python? I have the following functions in the library, that I can't change (simplified):
def g(a,b=2):
print a,b
def f(arg):
g(arg)
I can do
o={'a':10,'b':20}
g(**o)
10 20
but can I/how do I pass this through f
?
That's what I don't want:
f(**o)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: f() got an unexpected keyword argument 'a'
f(o)
{'a': 10, 'b': 20} 2