pygplates.GpmlTopologicalSectionList
- class pygplates.GpmlTopologicalSectionList
Bases:
instanceA list of
GpmlTopologicalSectioninstances. The list behaves like a regular pythonlistin that the following operations are supported:Operation
Result
for x in siterates over the elements x of s
x in sTrueif x is an item of sx not in sFalseif x is an item of ss += tthe GpmlTopologicalSectionList instance s is extended by sequence t
s + tthe concatenation of sequences s and t where either, or both, is a GpmlTopologicalSectionList
s[i]the item of s at index i
s[i] = xreplace the item of s at index i with x
del s[i]remove the item at index i from s
s[i:j]slice of s from i to j
s[i:j] = tslice of s from i to j is replaced by the contents of the sequence t (the slice and t can be different lengths)
del s[i:j]same as
s[i:j] = []s[i:j:k]slice of s from i to j with step k
del s[i:j:k]removes the elements of
s[i:j:k]from the lists[i:j:k] = tthe elements of
s[i:j:k]are replaced by those of t (the slice and t must be the same length ifk != 1)len(s)length of s
s.append(x)add element x to the end of s
s.extend(t)add the elements in sequence t to the end of s
s.insert(i,x)insert element x at index i in s
s.pop([i])removes the element at index i in s and returns it (defaults to last element)
s.remove(x)removes the first element in s that equals x (raises
ValueErrorif not found)s.count(x)number of occurrences of x in s
s.index(x[,i[,j]])smallest k such that
s[k] == xandi <= k < j(raisesValueErrorif not found)s.reverse()reverses the items of s in place
s.sort(key[,reverse])sort the items of s in place (note that key is not optional and, like python 3.0, we removed cmp)
A GpmlTopologicalSectionList can also be pickled.
Changed in version 0.42: Added pickle support.
- __init__()
You cannot directly instantiate this class from Python.
Note
This constructor is only provided for pickle support.
Methods
You cannot directly instantiate this class from Python.
append(x)Add element x to the end.
count(x)Number of occurrences of x.
extend(t)Add the elements in sequence t to the end.
index(x[,i[,j]])Smallest k such that the k th element equals
xandi <= k < j(raisesValueErrorif not found).insert(i, x)Insert element x at index i.
pop([i])Removes the element at index i and returns it (defaults to last element).
remove(x)Removes the first element that equals x (raises
ValueErrorif not found).reverse()Reverses the items in place.
sort(key[,reverse])Sort the items in place (note that key is not optional and, like python 3.0, we removed cmp).
- append(x)
Add element x to the end.
- count(x)
Number of occurrences of x.
- extend(t)
Add the elements in sequence t to the end.
- index(x[, i[, j]])
Smallest k such that the k th element equals
xandi <= k < j(raisesValueErrorif not found).
- insert(i, x)
Insert element x at index i.
- pop([i])
Removes the element at index i and returns it (defaults to last element).
- remove(x)
Removes the first element that equals x (raises
ValueErrorif not found).
- reverse()
Reverses the items in place.
- sort(key[, reverse])
Sort the items in place (note that key is not optional and, like python 3.0, we removed cmp).