Skip to main content

SimpleLazyObject

A lazy object initialized from any function. Designed for compound objects of unknown type. For builtins or objects of known type, use django.utils.functional.lazy.

Attributes

AttributeTypeDescription
_setupfunccallableA callable that returns the object to be wrapped and is used to initialize the lazy object when it is first accessed.
_wrappedThe internal storage for the initialized object after the setup function has been executed.

Constructor

Signature

def SimpleLazyObject(
func: callable
)

Parameters

NameTypeDescription
funccallableA callable that returns the object to be wrapped.