Format: application/octet-stream
1 from typing import Any, Callable, Hashable, Iterable, Iterator, MutableMapping, Optional, TypeVar, Union
2
3 _T = TypeVar("_T")
4 _Setlike = Union[BaseSet[_T], Iterable[_T]]
5 _SelfT = TypeVar("_SelfT")
6
7 class BaseSet(Iterable[_T]):
8 def __init__(self) -> None: ...
9 def __len__(self) -> int: ...
10 def __repr__(self) -> str: ...
11 def __str__(self) -> str: ...
12 def __iter__(self) -> Iterator[_T]: ...
13 def __cmp__(self, other: Any) -> int: ...
14 def __eq__(self, other: Any) -> bool: ...
15 def __ne__(self, other: Any) -> bool: ...
16 def copy(self: _SelfT) -> _SelfT: ...
17 def __copy__(self: _SelfT) -> _SelfT: ...
18 def __deepcopy__(self: _SelfT, memo: MutableMapping[int, BaseSet[_T]]) -> _SelfT: ...
19 def __or__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
20 def union(self: _SelfT, other: _Setlike[_T]) -> _SelfT: ...
21 def __and__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
22 def intersection(self: _SelfT, other: _Setlike[Any]) -> _SelfT: ...
23 def __xor__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
24 def symmetric_difference(self: _SelfT, other: _Setlike[_T]) -> _SelfT: ...
25 def __sub__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
26 def difference(self: _SelfT, other: _Setlike[Any]) -> _SelfT: ...
27 def __contains__(self, element: Any) -> bool: ...
28 def issubset(self, other: BaseSet[_T]) -> bool: ...
29 def issuperset(self, other: BaseSet[_T]) -> bool: ...
30 def __le__(self, other: BaseSet[_T]) -> bool: ...
31 def __ge__(self, other: BaseSet[_T]) -> bool: ...
32 def __lt__(self, other: BaseSet[_T]) -> bool: ...
33 def __gt__(self, other: BaseSet[_T]) -> bool: ...
34
35 class ImmutableSet(BaseSet[_T], Hashable):
36 def __init__(self, iterable: Optional[_Setlike[_T]] = ...) -> None: ...
37 def __hash__(self) -> int: ...
38
39 class Set(BaseSet[_T]):
40 def __init__(self, iterable: Optional[_Setlike[_T]] = ...) -> None: ...
41 def __ior__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
42 def union_update(self, other: _Setlike[_T]) -> None: ...
43 def __iand__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
44 def intersection_update(self, other: _Setlike[Any]) -> None: ...
45 def __ixor__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
46 def symmetric_difference_update(self, other: _Setlike[_T]) -> None: ...
47 def __isub__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
48 def difference_update(self, other: _Setlike[Any]) -> None: ...
49 def update(self, iterable: _Setlike[_T]) -> None: ...
50 def clear(self) -> None: ...
51 def add(self, element: _T) -> None: ...
52 def remove(self, element: _T) -> None: ...
53 def discard(self, element: _T) -> None: ...
54 def pop(self) -> _T: ...
55 def __as_immutable__(self) -> ImmutableSet[_T]: ...
56 def __as_temporarily_immutable__(self) -> _TemporarilyImmutableSet[_T]: ...
57
58 class _TemporarilyImmutableSet(BaseSet[_T]):
59 def __init__(self, set: BaseSet[_T]) -> None: ...
60 def __hash__(self) -> int: ...
61