classinstancemethod

Acts like a class method when called from a class, like an instance method when called by an instance. The method should take two arguments, 'self' and 'cls'; one of these will be None depending on how the method was called.


Methods

f __init__(self, func) ...

f __get__(self, obj, type=None) ...

See the source for more information.