| Home | Trees | Index | Help |
|
|---|
| Package dns :: Module rdataset :: Class SimpleSet |
|
object --+
|
SimpleSet
RdatasetA 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 | |
|---|---|
Initialize the set, making it empty. | |
__eq__(self,
other)
| |
__getstate__(...)
| |
__iter__(self)
| |
__len__(self)
| |
__ne__(self,
other)
| |
| a new object with type S, a subtype of T |
|
Add an item to the set. | |
Make the set empty. | |
Update the set, adding any elements from other which are not already in the set. | |
| Instance Variable Summary | |
|---|---|
items
- A list of the items which are in the set | |
| Class Variable Summary | |
|---|---|
list |
__slots__
|
| list | items
|
| Method Details |
|---|
__init__(self)
Initialize the set, making it empty.
|
__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.
|
| Instance Variable Details |
|---|
itemsA list of the items which are in the set |
| Class Variable Details |
|---|
__slots__
|
items
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 1.1 on Sat Jul 19 02:54:28 2003 | http://epydoc.sf.net |