Revert "Awaitable.__await__ should accept an Iterator rather than a Generator (#5194)" (#5195)

This reverts commit c687e297ec.
This commit is contained in:
Jelle Zijlstra
2021-04-09 00:49:39 -07:00
committed by GitHub
parent 8eaffee63a
commit 97c6806582

View File

@@ -207,7 +207,7 @@ class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]):
@runtime_checkable
class Awaitable(Protocol[_T_co]):
@abstractmethod
def __await__(self) -> Iterator[_T_co]: ...
def __await__(self) -> Generator[Any, None, _T_co]: ...
class Coroutine(Awaitable[_V_co], Generic[_T_co, _T_contra, _V_co]):
__name__: str