Class implementing sets of integers.
This is an efficient representation for sets consisting of several continuous ranges, e.g. 1-100,200-400,402-1000 is represented internally as a list of three pairs: [(1,100), (200,400), (402,1000)]. The internal representation is always kept normalized.
The constructor has up to three arguments:
- the string used to initialize the set (default '),
- the separator between ranges (default
,')
- the separator between begin and end of a range (default -
)
The separators must be strings (not regexprs) and should be different.
The tostring() function yields a string that can be passed to another IntSet constructor; __repr__() is a valid IntSet constructor itself.
There are no base classes.
There are no implemented interfaces.
There are no attributes in this class.
addpair(xlo, xhi)
append(x)
clone()
contains(x)
fromlist(list)
fromstring(data)
max()
min()
normalize()
reset()
tolist()
tostring()
There are no known subclasses.