lisa.utils.bothmethod#

class lisa.utils.bothmethod(f)[source]#

Bases: object

Decorator to allow a method to be used both as an instance method and a classmethod.

If it’s called on a class, the first parameter will be bound to the class, otherwise it will be bound to the instance.

Methods

Methods#

bothmethod.__get__(instance, owner)[source]#
bothmethod.__getattr__(attr)[source]#