Added missing operations to collections.Counter stub. (#575)

This commit is contained in:
Manuel Krebber
2016-09-27 19:07:57 +02:00
committed by Guido van Rossum
parent 68339ebf2e
commit aa549db5e5

View File

@@ -108,6 +108,17 @@ class Counter(Dict[_T, int], Generic[_T]):
@overload
def update(self, m: Union[Iterable[_T], Iterable[Tuple[_T, int]]]) -> None: ...
def __add__(self, other: Counter[_T]) -> Counter[_T]: ...
def __sub__(self, other: Counter[_T]) -> Counter[_T]: ...
def __and__(self, other: Counter[_T]) -> Counter[_T]: ...
def __or__(self, other: Counter[_T]) -> Counter[_T]: ...
def __pos__(self) -> Counter[_T]: ...
def __neg__(self) -> Counter[_T]: ...
def __iadd__(self, other: Counter[_T]) -> Counter[_T]: ...
def __isub__(self, other: Counter[_T]) -> Counter[_T]: ...
def __iand__(self, other: Counter[_T]) -> Counter[_T]: ...
def __ior__(self, other: Counter[_T]) -> Counter[_T]: ...
class OrderedDict(Dict[_KT, _VT], Generic[_KT, _VT]):
def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...
def move_to_end(self, key: _KT, last: bool = ...) -> None: ...