devctrl.data.data.ClassOrInstanceMethod#

class ClassOrInstanceMethod(f)[source]#

Bases: object

Decorator to make a class member function a class or instance method, depending on how it is called. The first argument will always be the class (usually called cls for class methods). If the method is called from an instance, the instance will be added as keyword argument ‘instance’.

Methods