Fix AwaitableGenerator inheritance; Awaitable is the return value, not the yielded value (#679)

This commit is contained in:
Guido van Rossum
2016-11-10 11:57:31 -08:00
committed by GitHub
parent 8305d51e75
commit ec4987fa5d

View File

@@ -135,7 +135,7 @@ class Coroutine(Awaitable[_V_co], Generic[_T_co, _T_contra, _V_co]):
# NOTE: This type does not exist in typing.py or PEP 484.
# The parameters corrrespond to Generator, but the 4th is the original type.
class AwaitableGenerator(Generator[_T_co, _T_contra, _V_co], Awaitable[_T_co],
class AwaitableGenerator(Generator[_T_co, _T_contra, _V_co], Awaitable[_V_co],
Generic[_T_co, _T_contra, _V_co, _S]):
pass