Iterable class of nodes with node ranges support.
NodeSet provides methods like update(), intersection_update() or
difference_update() methods, which conform to the Python Set API.
However, unlike RangeSet or standard Set, NodeSet is somewhat not so
strict for convenience, and understands NodeSet instance or NodeSet
string as argument. Also, there is no strict definition of one element,
for example, it IS allowed to do: >>>
nodeset.remove("blue[36-40]").
|
|
|
|
|
__getstate__(self)
Called when pickling: remove references to group resolver. |
source code
|
|
|
|
__setstate__(self,
dict)
Called when unpickling: restore parser using non group resolver. |
source code
|
|
|
|
_find_groups(self,
node,
namespace,
allgroups)
Find groups of node by namespace. |
source code
|
|
|
|
regroup(self,
groupsource=None,
autostep=None,
overlap=False,
noprefix=False)
Regroup nodeset using groups. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
update(self,
other)
s.update(t) returns nodeset s with elements added from t. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from NodeSetBase:
__and__,
__contains__,
__eq__,
__ge__,
__getitem__,
__gt__,
__iand__,
__ior__,
__isub__,
__iter__,
__ixor__,
__le__,
__len__,
__lt__,
__or__,
__str__,
__sub__,
__xor__,
add,
clear,
difference,
intersection,
remove,
symmetric_difference,
union
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__subclasshook__
|