Home | Trees | Index | Help |
|
---|
Package docutils ::
Module statemachine ::
Class ViewList
|
|
StringList
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.
Method Summary | |
---|---|
__init__(self,
initlist,
source,
items,
parent,
parent_offset)
| |
__add__(self,
other)
| |
__cmp__(self,
other)
| |
__contains__(self,
item)
| |
__delitem__(self,
i)
| |
__eq__(self,
other)
| |
__ge__(self,
other)
| |
__getitem__(self,
i)
| |
__gt__(self,
other)
| |
__iadd__(self,
other)
| |
__imul__(self,
n)
| |
__le__(self,
other)
| |
__len__(self)
| |
__lt__(self,
other)
| |
__mul__(self,
n)
| |
__ne__(self,
other)
| |
__radd__(self,
other)
| |
__repr__(self)
| |
__rmul__(self,
n)
| |
__setitem__(self,
i,
item)
| |
__str__(self)
| |
append(self,
item,
source,
offset)
| |
count(self,
item)
| |
Break link between this list and parent list. | |
extend(self,
other)
| |
index(self,
item)
| |
Return source & offset for index i . | |
insert(self,
i,
item,
source,
offset)
| |
Return offset for index i . | |
pop(self,
i)
| |
remove(self,
item)
| |
reverse(self)
| |
sort(self,
*args)
| |
Return source for index i . | |
Remove items from the end of the list, without touching the parent. | |
Remove items from the start of the list, without touching the parent. | |
__cast(self,
other)
|
Method Details |
---|
disconnect(self)Break link between this list and parent list. |
info(self, i)Return source & offset for indexi . |
offset(self, i)Return offset for indexi . |
source(self, i)Return source for indexi . |
trim_end(self, n=1)Remove items from the end of the list, without touching the parent. |
trim_start(self, n=1)Remove items from the start of the list, without touching the parent. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Tue Jul 22 05:30:24 2003 | http://epydoc.sf.net |