A simple set class.
This class implements a mutable set using a list as the container. We
don't use Python's set class because it's not indexable.
|
|
|
|
|
|
|
remove(self,
item)
Remove an item from the set. |
source code
|
|
|
discard(self,
item)
Remove an item from the set if present. |
source code
|
|
|
|
|
__copy__(self)
Make a (shallow) copy of the set. |
source code
|
|
|
copy(self)
Make a (shallow) copy of the set. |
source code
|
|
|
union_update(self,
other)
Update the set, adding any elements from other which are not already
in the set. |
source code
|
|
|
|
|
|
the same type as self
|
union(self,
other)
Return a new set which is the union of self and other. |
source code
|
|
the same type as self
|
|
the same type as self
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
update(self,
other)
Update the set, adding any elements from other which are not already
in the set. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
issubset(self,
other)
Is self a subset of other? |
source code
|
|
bool
|
issuperset(self,
other)
Is self a superset of other? |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|