class documentation

class cached_property: (source)

View In Hierarchy

Decorator that converts a method with a single self argument into a property cached on the instance. A cached property can be made out of an existing method: (e.g. ``url = cached_property(get_absolute_url)``).

Static Method func Undocumented
Method __get__ Call the function and put the return value in instance.__dict__ so that subsequent attribute access on the instance returns the cached value instead of calling cached_property.__get__().
Method __init__ Undocumented
Method __set_name__ Undocumented
Instance Variable name Undocumented
Instance Variable real_func Undocumented
@staticmethod
def func(instance): (source)

Undocumented

def __get__(self, instance, cls=None): (source)

Call the function and put the return value in instance.__dict__ so that subsequent attribute access on the instance returns the cached value instead of calling cached_property.__get__().

def __init__(self, func, name=None): (source)

Undocumented

def __set_name__(self, owner, name): (source)

Undocumented

Undocumented

real_func = (source)

Undocumented