Let's say I have some functions (with different numbers of arguments) like this:
def add(n1=None, n2=None):
return n1+n2
And I need to call them through the other, like this: call_another(function_name, arguments)
call_another(add, n1=1, n2=1)
I thought something with **kwargs:
def call_another(f, **kwargs):
# How to call f() sending the arguments?
return f(kwargs) # Obviously, don't work
I can't see a way to send the named arguments in kwargs to target function.