A very simple set class.
Sets are not in Python until 2.3, and we also don't have a hash
function for rdata which deals with name equivalence, so if we use a set
based on dictionaries we could end up with a set which contained objects
that were equal. To avoid all of this trouble, we have our own simple set
class. It implements a subset of the 2.3 Set interface using a list.
| Method Summary |
| |
__init__(self)
Initialize the set, making it empty. |
| |
__eq__(self,
other)
|
| |
__iter__(self)
|
| |
__len__(self)
|
| |
__ne__(self,
other)
|
| a new object with type S, a subtype of T
|
__new__(S,
...)
|
| |
add(self,
item)
Add an item to the set. |
| |
clear(self)
Make the set empty. |
| |
update(self,
other)
Update the set, adding any elements from other which are not already
in the set. |