Package couchdbkit :: Package schema :: Module properties :: Class LazyList
[hide private]
[frames] | no frames]

Class LazyList

source code

object --+    
         |    
      list --+
             |
            LazyList

object to make sure we keep update of list in _doc. We just override a list and maintain change in doc reference (doc[index] obviously).

if init_vals is specified, doc is overwritten with the list given. Otherwise, the values already in doc are used.

Instance Methods [hide private]
new empty list
__init__(self, doc, item_type=None, init_vals=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_wrap(self) source code
 
__delitem__(self, index)
del x[y]
source code
 
__setitem__(self, index, value)
x[i]=y
source code
 
__delslice__(self, i, j)
del x[i:j]
source code
 
__getslice__(self, i, j)
x[i:j]
source code
 
__setslice__(self, i, j, seq)
x[i:j]=y
source code
 
__contains__(self, value)
y in x
source code
 
append(self, *args, **kwargs)
append object to end
source code
 
index(self, x, *args)
L.index(value, [start, [stop]]) -> integer -- return first index of value.
source code
 
remove(self, x)
remove first occurrence of value.
source code
 
sort(self, cmp=None, key=None, reverse=False)
stable sort *IN PLACE*; cmp(x, y) -> -1, 0, 1
source code
 
reverse(self)
reverse *IN PLACE*
source code

Inherited from list: __add__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __sizeof__, count, extend, insert, pop

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from list: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, doc, item_type=None, init_vals=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Returns: new empty list
Overrides: object.__init__
(inherited documentation)

__delitem__(self, index)
(Index deletion operator)

source code 

del x[y]

Overrides: list.__delitem__
(inherited documentation)

__setitem__(self, index, value)
(Index assignment operator)

source code 

x[i]=y

Overrides: list.__setitem__
(inherited documentation)

__delslice__(self, i, j)
(Slice deletion operator)

source code 

del x[i:j]

Use of negative indices is not supported.

Overrides: list.__delslice__
(inherited documentation)

__getslice__(self, i, j)
(Slicling operator)

source code 

x[i:j]

Use of negative indices is not supported.

Overrides: list.__getslice__
(inherited documentation)

__setslice__(self, i, j, seq)
(Slice assignment operator)

source code 

x[i:j]=y

Use of negative indices is not supported.

Overrides: list.__setslice__
(inherited documentation)

__contains__(self, value)
(In operator)

source code 

y in x

Overrides: list.__contains__
(inherited documentation)

append(self, *args, **kwargs)

source code 

append object to end

Overrides: list.append
(inherited documentation)

index(self, x, *args)

source code 

L.index(value, [start, [stop]]) -> integer -- return first index of value. Raises ValueError if the value is not present.

Overrides: list.index
(inherited documentation)

remove(self, x)

source code 

remove first occurrence of value. Raises ValueError if the value is not present.

Overrides: list.remove
(inherited documentation)

sort(self, cmp=None, key=None, reverse=False)

source code 

stable sort *IN PLACE*; cmp(x, y) -> -1, 0, 1

Overrides: list.sort
(inherited documentation)

reverse(self)

source code 

reverse *IN PLACE*

Overrides: list.reverse
(inherited documentation)