Deprecated alias to collections.abc.AsyncGenerator.
class typing.AsyncGenerator(AsyncIterator[YieldType], Generic[YieldType, SendType])
async def echo_round() -> AsyncGenerator[int, float]:
sent = yield 0
while sent >= 0.0:
rounded = await round(sent)
sent = yield rounded
async def infinite_stream(start: int) -> AsyncGenerator[int, None]:
while True:
yield start
start = await increment(start)
async def infinite_stream(start: int) -> AsyncIterator[int]:
while True:
yield start
start = await increment(start)