API Reference / Modules / internal / types / collections / set internal.types.collections.set Standard library module View source class Set class Set[K] View complete class API → Fields 1 K type Constructors 2 __init__ __init__(self) __init__ __init__(self, g: Generator[K]) Methods 18 resize resize(self, new_n_buckets: int) add add(self, key: K) update update(self, other: Generator[K]) remove remove(self, key: K) pop pop(self) discard discard(self, key: K) difference difference(self, other: Set[K]) difference_update difference_update(self, other: Set[K]) intersection intersection(self, other: Set[K]) intersection_update intersection_update(self, other: Set[K]) symmetric_difference symmetric_difference(self, other: Set[K]) symmetric_difference_update symmetric_difference_update(self, other: Set[K]) union union(self, other: Set[K]) isdisjoint isdisjoint(self, other: Set[K]) issubset issubset(self, other: Set[K]) issuperset issuperset(self, other: Set[K]) clear clear(self) copy copy(self) Special methods 21 __sub__ __sub__(self, other: Set[K]) __isub__ __isub__(self, other: Set[K]) __and__ @commutative @associative __and__(self, other: Set[K]) __iand__ __iand__(self, other: Set[K]) __or__ @commutative @associative __or__(self, other: Set[K]) __ior__ __ior__(self, other: Set[K]) __xor__ @commutative @associative __xor__(self, other: Set[K]) __ixor__ __ixor__(self, other: Set[K]) __contains__ __contains__(self, key: K) __eq__ __eq__(self, other: Set[K]) __ne__ __ne__(self, other: Set[K]) __le__ __le__(self, other: Set[K]) __ge__ __ge__(self, other: Set[K]) __lt__ __lt__(self, other: Set[K]) __gt__ __gt__(self, other: Set[K]) __iter__ __iter__(self) __len__ __len__(self) __bool__ __bool__(self) __copy__ __copy__(self) __deepcopy__ __deepcopy__(self) __repr__ __repr__(self)
class Set class Set[K] View complete class API → Fields 1 K type Constructors 2 __init__ __init__(self) __init__ __init__(self, g: Generator[K]) Methods 18 resize resize(self, new_n_buckets: int) add add(self, key: K) update update(self, other: Generator[K]) remove remove(self, key: K) pop pop(self) discard discard(self, key: K) difference difference(self, other: Set[K]) difference_update difference_update(self, other: Set[K]) intersection intersection(self, other: Set[K]) intersection_update intersection_update(self, other: Set[K]) symmetric_difference symmetric_difference(self, other: Set[K]) symmetric_difference_update symmetric_difference_update(self, other: Set[K]) union union(self, other: Set[K]) isdisjoint isdisjoint(self, other: Set[K]) issubset issubset(self, other: Set[K]) issuperset issuperset(self, other: Set[K]) clear clear(self) copy copy(self) Special methods 21 __sub__ __sub__(self, other: Set[K]) __isub__ __isub__(self, other: Set[K]) __and__ @commutative @associative __and__(self, other: Set[K]) __iand__ __iand__(self, other: Set[K]) __or__ @commutative @associative __or__(self, other: Set[K]) __ior__ __ior__(self, other: Set[K]) __xor__ @commutative @associative __xor__(self, other: Set[K]) __ixor__ __ixor__(self, other: Set[K]) __contains__ __contains__(self, key: K) __eq__ __eq__(self, other: Set[K]) __ne__ __ne__(self, other: Set[K]) __le__ __le__(self, other: Set[K]) __ge__ __ge__(self, other: Set[K]) __lt__ __lt__(self, other: Set[K]) __gt__ __gt__(self, other: Set[K]) __iter__ __iter__(self) __len__ __len__(self) __bool__ __bool__(self) __copy__ __copy__(self) __deepcopy__ __deepcopy__(self) __repr__ __repr__(self)