This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from collections import deque | |
from typing import Any, Callable, Collection, AsyncIterator, Iterator, Union | |
async def _next(gg): | |
# repackaging non-asyncio next() as async-like anext() | |
try: | |
return next(gg) | |
except StopIteration: |