Skip to main content

is_func_yield

FunctionSource

v_1: bool = is_func_yield(func: Any)

Check whether the given object is a function returning an iterator.

Will check the real-time implementation first. If not detected, will check the annotation.

Arguments

Requires

NameTypeRequired
Description
funcAnyThe function candidate object to be checked.

Returns

NameType
Description
v_1boolA flag that will be True if the function returns the generator/iterator.