lisa.utils.instancemethod#
- class lisa.utils.instancemethod(f)[source]#
Bases:
object
Decorator providing a hybrid of a normal method and a classmethod:
Like a classmethod, it can be looked up on the class itself, and the class is passed as first parameter. This allows selecting the class “manually” before applying on an instance.
Like a normal method, it can be looked up on an instance. In that case, the first parameter is the class of the instance and the second parameter is the instance itself.
Methods