From b3c76aab491c97bd2f95a0b717c89b51c864a885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E8=91=89?= Date: Sat, 13 Apr 2019 01:05:58 -0500 Subject: [PATCH] KeysView and ItemsView should accecpt Iterable argument in set operation (#2906) --- stdlib/3/typing.pyi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index 8473c4796..71c5fdf2f 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -333,12 +333,18 @@ class MappingView: def __len__(self) -> int: ... class ItemsView(MappingView, AbstractSet[Tuple[_KT_co, _VT_co]], Generic[_KT_co, _VT_co]): + def __and__(self, o: Iterable[_T]) -> AbstractSet[Union[Tuple[_KT_co, _VT_co], _T]]: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[Tuple[_KT_co, _VT_co]]: ... + def __or__(self, o: Iterable[_T]) -> AbstractSet[Union[Tuple[_KT_co, _VT_co], _T]]: ... + def __xor__(self, o: Iterable[_T]) -> AbstractSet[Union[Tuple[_KT_co, _VT_co], _T]]: ... class KeysView(MappingView, AbstractSet[_KT_co], Generic[_KT_co]): + def __and__(self, o: Iterable[_T]) -> AbstractSet[Union[_KT_co, _T]]: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[_KT_co]: ... + def __or__(self, o: Iterable[_T]) -> AbstractSet[Union[_KT_co, _T]]: ... + def __xor__(self, o: Iterable[_T]) -> AbstractSet[Union[_KT_co, _T]]: ... class ValuesView(MappingView, Iterable[_VT_co], Generic[_VT_co]): def __contains__(self, o: object) -> bool: ...