I have a class with an init function that needs ~20 variables passed to it. Instantiations of the class are rather ugly:
some_var = MyClass(param1=mydict('param1')
param2=mydict('param2')
param3=mydict('param3')
...
param20=mydict('param20')
I keep all of those parameters in a dictionary for easy handling already. Not all parameters are necessary so I don't want the class to accept only a dictionary object I don't think.
I'm wondering if I there's a nice trick to clean this up by specifying that the parameters to init are to be taken from the dictionary?
I'm just looking for tips and tricks on tidying this up a little. I have quite a few long/ugly instantiations of this class.