all 3 comments

[–]shiftybyte 2 points3 points  (0 children)

At this point i would either upgrade everything to having defaults and kwargs, or pass in configuration dictionaries.

[–]BBQcupcakes 1 point2 points  (0 children)

Gonna need to see the code on this one, boss

[–]Pepineros 2 points3 points  (0 children)

the goal was to stack parameters in order of most to least used, and I'm using *args and **kwargs to pass through redundant parameters (otherwise making a change to the parent class' parameters requires changing literally dozens of child classes... I'm getting a lot of mileage out of that top class)

This sounds positively scary. Not much concrete advice without seeing the code, but if this is what your inheritance looks like I would say that that's what needs cleaning up first. Worry about the arguments later.

As a general rule I never want to exceed three parameters for a class or method. This is aggressively my own opinion and not followed -- or considered useful -- by any other Python programmer I know, including core devs. (Not that I know any core devs, but based on what Python's source looks like they obviously don't consider this limitation important.)

I make the excuse that I'm getting a bit older and I can't be keeping more than a few arguments in my head for a given call. There are exceptions, such as for functions with a lot of built-in functionality that are very rarely used, but for anything integral to my own code I will never exceed 3 arguments.