lisa.utils.dispatch_kwargs#
- lisa.utils.dispatch_kwargs(funcs, kwargs, call=True, allow_overlap=False)[source]#
Dispatch the provided
kwargs
mapping to thefuncs
functions, based on their signature.- Parameters:
funcs (list(collections.abc.Callable)) – List of functions to dispatch to.
kwargs (dict(str, object)) – Dictionary of arguments to pass to the functions.
call (bool) – If
True
, the functions are called and the return value is a{f: result}
withf
functions offuncs
. IfFalse
, theresult
is just a mapping of arguments ready to be used to call the given function.allow_overlap (bool) – If
False
, the provided functions are not allowed to have overlapping parameters. If they do, aTypeError
is raised.