mlazy
Memoized lazy evaluation. The function is only evaluated once, every subsequent access will return the same value.
Attributes
| Attribute | Type | Description |
|---|---|---|
| evaluated | boolean = False | Set 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
| Type | Description |
|---|---|
Any | The result of the lazy evaluation, retrieved from the cache if previously computed. |