From 1c02f14dc132041f1444d06260df6b0af70ddd43 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 11 Jan 2016 15:32:43 -0800 Subject: [PATCH] Make Reversible covariant. Fixes #19. (Though it does not seem to be *necessary*.) --- stdlib/2.7/typing.pyi | 2 +- stdlib/3/typing.pyi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/2.7/typing.pyi b/stdlib/2.7/typing.pyi index f29c48254..edd0a8d00 100644 --- a/stdlib/2.7/typing.pyi +++ b/stdlib/2.7/typing.pyi @@ -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]: ... diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index da4f69f8f..783874d47 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -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]: ...