Functions in a python class can be either instance methods, class methods or static methods.
The former is characterised by the self as its first (implicit) argument, acts directly on the instance of the class, and does not require any decorators to be treated as such.
The other two, however, need decorators @classmethod and @staticmethod before the name of the method - this is why I refer to the instance method as the "default" one, i.e. the one for which a wrapper is not needed.
My question is:
suppose I am in a class, and I am breaking up my calculation into several functions for readibility. Only one of these methods will need access to the self.something variables that I share instance-wise, but most of the others do not need to know about the class they belong to - they are just there for "housekeeping".
Should make these functions (the ones that do not need any self.something knowledge) all @staticmethod?
Doing so would require a decorator and hence an extra step.
It would be easier (not requiring the extra step of using a decotrator) for every method to just be an instance method, thus inheritig a lot of potential but also waisting it since it is not needed for the scope of the functions in question.
Why is the instance method the "default"?
Why not have every method a static method by default, and give it the extra functionality associated with being a instance method with a wrapper?
@staticmethodis for: "I have helper functions that aid with class functionality, but aren't very useful outside the class, and have no direct reliance on the class or its instances, so we'll namespace them inside the class to make it clear they're class helpers." It's just that that's the unusual case, so there is no reason to make it the default behavior.