Base class for NodeSet.
This class allows node set base object creation from specified string
pattern and rangeset object. If optional copy_rangeset boolean flag is
set to True (default), provided rangeset object is copied (if needed),
otherwise it may be referenced (should be seen as an ownership transfer
upon creation).
This class implements core node set arithmetics (no string parsing
here).
|
__init__(self,
pattern=None,
rangeset=None,
copy_rangeset=True,
autostep=None,
fold_axis=None)
New NodeSetBase object initializer |
source code
|
|
|
get_autostep(self)
Get autostep value (property) |
source code
|
|
|
set_autostep(self,
val)
Set autostep value (property) |
source code
|
|
|
_iter(self)
Iterator on internal item tuples (pattern, indexes, padding,
autostep). |
source code
|
|
|
_iterbase(self)
Iterator on single, one-item NodeSetBase objects. |
source code
|
|
|
__iter__(self)
Iterator on single nodes as string. |
source code
|
|
|
striter(self)
Iterator on single nodes as string. |
source code
|
|
|
nsiter(self)
Object-based NodeSet iterator on single nodes. |
source code
|
|
|
|
|
__len__(self)
Get the number of nodes in NodeSet. |
source code
|
|
|
_iter_nd_pat(self,
pat,
rset)
Take a pattern and a RangeSetND object and iterate over nD computed
nodeset strings while following fold_axis constraints. |
source code
|
|
|
|
|
|
|
__contains__(self,
other)
Is node contained in NodeSet ? |
source code
|
|
|
|
|
issubset(self,
other)
Report whether another nodeset contains this nodeset. |
source code
|
|
|
issuperset(self,
other)
Report whether this nodeset contains another nodeset. |
source code
|
|
|
__eq__(self,
other)
NodeSet equality comparison. |
source code
|
|
|
__le__(self,
other)
Report whether another nodeset contains this nodeset. |
source code
|
|
|
__ge__(self,
other)
Report whether this nodeset contains another nodeset. |
source code
|
|
|
|
|
|
|
_extractslice(self,
index)
Private utility function: extract slice parameters from slice object
`index` for an list-like object of size `length`. |
source code
|
|
|
__getitem__(self,
index)
Return the node at specified index or a subnodeset when a slice is
specified. |
source code
|
|
|
|
|
_add(self,
pat,
rangeset,
copy_rangeset=True)
Add nodes from a (pat, rangeset) tuple. |
source code
|
|
|
union(self,
other)
s.union(t) returns a new set with elements from both s and t. |
source code
|
|
|
|
|
|
|
update(self,
other)
s.update(t) returns nodeset s with elements added from t. |
source code
|
|
|
updaten(self,
others)
s.updaten(list) returns nodeset s with elements added from given
list. |
source code
|
|
|
clear(self)
Remove all nodes from this nodeset. |
source code
|
|
|
|
|
intersection(self,
other)
s.intersection(t) returns a new set with elements common to s and t. |
source code
|
|
|
|
|
intersection_update(self,
other)
``s.intersection_update(t)`` returns nodeset s keeping only elements
also found in t. |
source code
|
|
|
|
|
difference(self,
other)
``s.difference(t)`` returns a new NodeSet with elements in s but not
in t. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
symmetric_difference_update(self,
other)
``s.symmetric_difference_update(t)`` returns nodeset s keeping all
nodes that are in exactly one of the nodesets. |
source code
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|