General Set APIΒΆ

From the Python documentation.

Class

Inherits from

Abstract methods

Mixin methods

collections.abc.Set

Collection

__contains__, __iter__, __len__

__le__, __lt__, __eq__, __ne__, __gt__, __ge__, __and__, __or__, __sub__, __xor__, and isdisjoint

collections.abc.MutableSet

Set

__contains__, __iter__, __len__, add, discard

Inherited Set methods and clear, pop, remove, __ior__, __iand__, __ixor__, and __isub__

set (builtin)

β€”

MutableSet methods and __rand__, __ror__, __rsub__, __rxor__, copy, difference, difference_update, discard, intersection, intersection_update, issubset, issuperset, symmetric_difference, symmetric_difference_update, union, update

frozenset (builtin)

β€”

Set methods and __rand__, __ror__, __rsub__, __rxor__, copy, difference, intersection, symmetric_difference, union

typing.AbstractSet (deprecated since 3.9)

typing.Set (deprecated since 3.9)

typing.MutableSet (deprecated since 3.9)

typing.FrozenSet (deprecated since 3.9)