lenskit.lazy#
Types and functions for lazy values. These are used mostly for pipeline inputs.
Classes#
Type for lazily-computed values. |
Functions#
|
Create a lazy wrapper for an already-computed value. |
|
Create a lazy value that calls the provided function to get the value as |
Module Contents#
- lenskit.lazy.lazy_value[T](value)#
Create a lazy wrapper for an already-computed value.
- Parameters:
value (T) – The value to wrap in a lazy object.
- Returns:
A lazy wrapper for the already-computed value.
- Return type:
Lazy[T]
- lenskit.lazy.lazy_thunk[T](thunk)#
Create a lazy value that calls the provided function to get the value as needed.
- Parameters:
thunk (collections.abc.Callable[[], T]) – The function to call to supply a value. Will only be called once.
- Returns:
A
Lazythat will call the provided function.- Return type:
Lazy[T]