|
__init__(self,
pattern=None,
autostep=None)
Initialize RangeSet with optional pdsh-like string pattern and
autostep threshold. |
source code
|
|
|
__iter__(self)
Iterate over each item in RangeSet. |
source code
|
|
|
__len__(self)
Get the number of items in RangeSet. |
source code
|
|
|
|
|
|
|
__contains__(self,
elem)
Is element contained in RangeSet? Element can be either a string with
optional padding (eg. |
source code
|
|
|
_contains(self,
ielem)
Contains subroutine that takes an integer. |
source code
|
|
|
_contains_with_padding(self,
ielem,
pad)
Contains subroutine that takes an integer and a padding value. |
source code
|
|
|
|
|
issubset(self,
rangeset)
Report whether another rangeset contains this rangeset. |
source code
|
|
|
issuperset(self,
rangeset)
Report whether this rangeset contains another rangeset. |
source code
|
|
|
__eq__(self,
other)
RangeSet equality comparison. |
source code
|
|
|
__le__(self,
rangeset)
Report whether another rangeset contains this rangeset. |
source code
|
|
|
__ge__(self,
rangeset)
Report whether this rangeset contains another rangeset. |
source code
|
|
|
|
|
|
|
__getitem__(self,
i)
Return the element at index i. |
source code
|
|
|
|
|
|
|
|
|
_fold(self,
items,
pad)
Fold items as ranges and group them by step. |
source code
|
|
|
add_range(self,
start,
stop,
step=1,
pad=0)
Add a range (start, stop, step and padding length) to RangeSet. |
source code
|
|
|
_add_range_exfold(self,
start,
stop,
step,
pad)
Add range expanding then folding all items. |
source code
|
|
|
union(self,
other)
s.union(t) returns a new rangeset with elements from both s and t. |
source code
|
|
|
|
|
|
|
update(self,
rangeset)
Update a rangeset with the union of itself and another. |
source code
|
|
|
clear(self)
Remove all ranges from this rangeset. |
source code
|
|
|
|
|
intersection(self,
rangeset)
s.intersection(t) returns a new rangeset with elements common to s
and t. |
source code
|
|
|
|
|
intersection_update(self,
rangeset)
Intersection with provided RangeSet. |
source code
|
|
|
|
|
_intersect_exfold(self,
rangeset)
Calc intersection with the expand/fold method. |
source code
|
|
|
difference(self,
rangeset)
s.difference(t) returns a new rangeset with elements in s but not in
t. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
symmetric_difference_update(self,
rangeset)
s.symmetric_difference_update(t) returns rangeset s keeping all
elements that are in exactly one of the rangesets. |
source code
|
|
|
|
|
_xor_exfold(self,
rangeset)
Calc symmetric difference (xor). |
source code
|
|