List with extended functionality: slices of ViewList objects are child lists, linked to their parents. Changes made to a child list also affect the parent list. A child list is effectively a "view" (in the SQL sense) of the parent list. Changes to parent lists, however, do not affect active child lists. If a parent list is changed, any active child lists should be recreated.
The start and end of the slice can be trimmed using the trim_start() and trim_end() methods, without affecting the parent list. The link between child and parent lists can be broken by calling disconnect() on the child list.
Also, ViewList objects keep track of the source & offset of each item. This information is accessible via the source(), offset(), and info() methods.
There are no base classes.
There are no implemented interfaces.
There are no attributes in this class.
append(item, source=None, offset=0)
count(item)
disconnect()
Break link between this list and parent list.
extend(other)
index(item)
info(i)
Return source & offset for index i.
insert(i, item, source=None, offset=0)
offset(i)
Return offset for index i.
pop(i=-1)
remove(item)
reverse()
sort(*args)
source(i)
Return source for index i.
trim_end(n=1)
Remove items from the end of the list, without touching the parent.
trim_start(n=1)
Remove items from the start of the list, without touching the parent.