Add dict views to python 2 (#376)

This commit is contained in:
Michael Lee
2016-07-21 11:28:35 -07:00
committed by Guido van Rossum
parent d787dbe984
commit 368c703078
3 changed files with 25 additions and 6 deletions

View File

@@ -169,7 +169,7 @@ class MutableSequence(Sequence[_T], Generic[_T]):
def remove(self, object: _T) -> None: ...
def __iadd__(self, x: Iterable[_T]) -> MutableSequence[_T]: ...
class AbstractSet(Iterable[_KT_co], Container[_KT_co], Sized, Generic[_KT_co]):
class AbstractSet(Iterable[_T_co], Container[_T_co], Sized, Generic[_T_co]):
@abstractmethod
def __contains__(self, x: object) -> bool: ...
# Mixin methods
@@ -177,10 +177,10 @@ class AbstractSet(Iterable[_KT_co], Container[_KT_co], Sized, Generic[_KT_co]):
def __lt__(self, s: AbstractSet[Any]) -> bool: ...
def __gt__(self, s: AbstractSet[Any]) -> bool: ...
def __ge__(self, s: AbstractSet[Any]) -> bool: ...
def __and__(self, s: AbstractSet[Any]) -> AbstractSet[_KT_co]: ...
def __or__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_KT_co, _T]]: ...
def __sub__(self, s: AbstractSet[Any]) -> AbstractSet[_KT_co]: ...
def __xor__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_KT_co, _T]]: ...
def __and__(self, s: AbstractSet[Any]) -> AbstractSet[_T_co]: ...
def __or__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ...
def __sub__(self, s: AbstractSet[Any]) -> AbstractSet[_T_co]: ...
def __xor__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ...
# TODO: Argument can be a more general ABC?
def isdisjoint(self, s: AbstractSet[Any]) -> bool: ...