keep_lazy
A decorator that allows a function to be called with one or more lazy arguments. If none of the args are lazy, the function is evaluated immediately, otherwise a proxy is returned that will evaluate the function when needed.
def keep_lazy(
*resultclasses: type
) - > function
A decorator that allows a function to be called with one or more lazy arguments. If none of the args are lazy, the function is evaluated immediately, otherwise a proxy is returned that will evaluate the function when needed.
Parameters
| Name | Type | Description |
|---|---|---|
| *resultclasses | type | One or more classes that represent the expected return types of the decorated function, used to initialize the lazy proxy. |
Returns
| Type | Description |
|---|---|
function | A decorator function that wraps the target function to handle lazy evaluation logic based on input types. |