Make FrozenSet covariant. (#769)

Follow-up for PR #726.
This commit is contained in:
Guido van Rossum
2016-12-13 11:40:18 -08:00
committed by GitHub
parent bc252d69ac
commit b46280ec78
2 changed files with 2 additions and 2 deletions

View File

@@ -143,7 +143,7 @@ class AbstractSet(Sized, Iterable[_T_co], Container[_T_co], Generic[_T_co]):
# TODO: argument can be any container?
def isdisjoint(self, s: AbstractSet[Any]) -> bool: ...
class FrozenSet(AbstractSet[_T], Generic[_T]): ...
class FrozenSet(AbstractSet[_T_co], Generic[_T_co]): ...
class MutableSet(AbstractSet[_T], Generic[_T]):
@abstractmethod

View File

@@ -210,7 +210,7 @@ class AbstractSet(Iterable[_T_co], Container[_T_co], Sized, Generic[_T_co]):
# TODO: Argument can be a more general ABC?
def isdisjoint(self, s: AbstractSet[Any]) -> bool: ...
class FrozenSet(AbstractSet[_T], Generic[_T]): ...
class FrozenSet(AbstractSet[_T_co], Generic[_T_co]): ...
class MutableSet(AbstractSet[_T], Generic[_T]):
@abstractmethod