I'm trying to make convenient passing some set of arguments to a number of functions (say 20).
Consider the following MWE (of course I don't really consider doing additions in such way):
def function(a, b):
return a + b
class summation:
def __init__(self, a, b):
self.a = a
self.b = b
s = summation(1,2)
function(**s.__dict__)
The reason I'm trying to do it is I have a bunch of functions all receiving 4 same arguments and I need to process them in a pipeline, passing from one function to another.
Implying that s
always has only relevant fields is it a good way to pass arguments?