Deferred¶
- class jsonapi_serde.deferred.Deferred(yielder: Callable[[...], jsonapi_serde.deferred.T], *args, **kwargs)¶
A deferred object encapsulates a lazy evaluated value. It takes a function that yields the value for its constructor argument, and it behaves as a callable by which it resolves to the yielded value.
An attribute access to a
Deferredrecursively results in anotherDeferredthat encapsulates the access to the attribute.- Parameters
yielder (Callable[..., T]) – a callable that resolves the value.
args – positional arguments for the yielder.
kwargs – keyword arguments for the yielder.