Skip to main content

Staticmethod python

 Defined as


@staticmethod
def func(args, ...)
@staticmethod = decorator
static methods do not have access to the properties of the class itself but you want them to belong to the class

For example a utility function which might be useful for a class but you don't want it to interfere with other things in the class