This class wraps a list of work items and provides the same interface as a standard Python list. Work items in the list are only converted to pdg.WorkItem objects when they're accessed. The work items in the list cannot be modified, e.g. attempting to write to their attributes will be result in an exception.
Methods ¶
append(work_item)
Appends the work_item
to the end of the list.
count(work_item)
→ int
Returns the number of occurrences of work_item
in the list.
extend(list)
Adds the specified list to the end of this list.
index(work_item, start=0, stop=-1)
→ int
Returns the index of the work item in the list, between start
and stop
.
insert(work_item, index)
Inserts a work_item at the specified index
.
pop(index=-1)
→ pdg.WorkItem
Removes and returns the work item at the specified index.
remove(work_item)
Removes the first occurrence of work_item
in the list.
reverse()
Reverses the order of elements in the list
sort(key=None, reverse=False)
Sorts the contents of the list using the specified key
to compare elements, if its set.