(
    interval: Union[int, Iterable[int]] = 1
)
Generator for constant intervals.

    Args:
        interval: A constant value to yield or an iterable of such values.
Generator for constant intervals.
Generator for constant intervals .
def constant(
    interval: Union[int, Iterable[int]] = 1
) -> Generator[int, None, None]:
    """Generator for constant intervals.

    Args:
        interval: A constant value to yield or an iterable of such values.
    """
    # Advance past initial .send() call
    yield  # type: ignore[misc]

    try:
        itr = iter(interval)  # type: ignore
    except TypeError:
        itr = itertools.repeat(interval)  # type: ignore

    for val in itr:
        yield val
def constant ( interval : Union [ int , Iterable [ int ] ] = 1 ) -> Generator [ int , None , None ] : # Advance past initial .send() call yield # type: ignore[misc] try : itr = iter ( interval ) # type: ignore except TypeError : itr = itertools . repeat ( interval ) # type: ignore for val in itr : yield val