TypedSet#
- class TypedSet(iterable=[], types=[])[source]#
A set that enforces all elements have the same type.
- Attributes:
- types
Methods
add
(item)Add an element to a set.
Return the difference of two or more sets as a new set.
Remove all elements of another set from this set.
Remove an element from a set if it is a member.
Return the intersection of two sets as a new set.
Update a set with the intersection of itself and another.
Return True if two sets have a null intersection.
Report whether another set contains this set.
Report whether this set contains another set.
Return the symmetric difference of two sets as a new set.
Update a set with the symmetric difference of itself and another.
Return the union of sets as a new set.