Skip to main content

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

NameTypeDescription
ititerableThe collection of items to process, which may contain a mix of static values and promise objects.

Returns

TypeDescription
generatorA generator yielding the realized values from the input iterable, where promises have been replaced by their resolved results.