In Python 2.2, Python's function object model was extended to include a differentiation between methods: static and class. Methods that are static are not referenced outside of the class's methods and attributes. Because they do not interact with the world outside the class, they are consider immutable. To assign this immutability to the method, one used the method staticmethod():
Because static methods never reference and are never referenced outside of the class, they have no need for a self parameter.
class Class: Â Â Â Â def method() Â Â Â Â Â Â Â Â ... Â Â Â Â method = staticmethod(method)
[Note: This code is for illustration only. As we are about to see, this syntax has now changed. Of course, Python offers backward compatability for a few versions, but you should use the new syntax, not this.]