Skip to main content

mlazy

Memoized lazy evaluation. The function is only evaluated once, every subsequent access will return the same value.

Attributes

AttributeTypeDescription
evaluatedboolean = FalseSet to :const:True after the object has been evaluated.

Constructor

Signature

def mlazy() - > null

Methods


evaluate()

@classmethod
def evaluate() - > Any

Evaluates the function and caches the result; every subsequent access returns the same memoized value.

Returns

TypeDescription
AnyThe result of the lazy evaluation, retrieved from the cache if previously computed.