evaluate_promises
Iterates through a collection and evaluates any encountered promise objects by calling them, yielding the resulting values.
def evaluate_promises(
it: iterable
) - > generator
Iterates through a collection and resolves any promise objects encountered by calling them. Use this to ensure all lazy-evaluated values in an iterable are realized before further processing.
Parameters
| Name | Type | Description |
|---|---|---|
| it | iterable | The collection of items to process, which may contain a mix of static values and promise objects. |
Returns
| Type | Description |
|---|---|
generator | A generator yielding the realized values from the input iterable, where promises have been replaced by their resolved results. |