Make Reversible covariant. Fixes #19. (Though it does not seem to be *necessary*.)

This commit is contained in:
Guido van Rossum
2016-01-11 15:32:43 -08:00
parent 0673b7bab9
commit 1c02f14dc1
2 changed files with 2 additions and 2 deletions

View File

@@ -60,7 +60,7 @@ class SupportsRound(Generic[_T]):
@abstractmethod
def __round__(self, ndigits: int = ...) -> _T: ...
class Reversible(Generic[_T]):
class Reversible(Generic[_T_co]):
@abstractmethod
def __reversed__(self) -> Iterator[_T]: ...

View File

@@ -70,7 +70,7 @@ class SupportsRound(Generic[_T]):
@abstractmethod
def __round__(self, ndigits: int = ...) -> _T: ...
class Reversible(Generic[_T]):
class Reversible(Generic[_T_co]):
@abstractmethod
def __reversed__(self) -> Iterator[_T]: ...