Package pyffi :: Package object_models :: Module array_type :: Class ValidatedList
[hide private]
[frames] | no frames]

Class ValidatedList

source code

object --+    
         |    
      list --+
             |
            ValidatedList
Known Subclasses:

Abstract base class for lists whose items can be validated (for instance, for type checks).
Instance Methods [hide private]
new empty list
__init__(self, *args, **kwargs)
Initialize empty list.
source code
 
__setitem__(self, index, item)
Set item at given index.
source code
 
append(self, item)
Validate item and append to list.
source code
 
extend(self, other)
Validate items and extend list.
source code
 
insert(self, index, item)
Validate item and insert.
source code

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __setslice__, __sizeof__, count, index, pop, remove, reverse, sort

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

Class Methods [hide private]
 
validate(cls, item)
Checks that the item can be added to the list.
source code
Class Variables [hide private]

Inherited from list: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 
Initialize empty list.
Returns: new empty list
Overrides: object.__init__

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

source code 
Set item at given index.
Overrides: list.__setitem__

append(self, item)

source code 
Validate item and append to list.
Overrides: list.append

extend(self, other)

source code 
Validate items and extend list.
Overrides: list.extend

insert(self, index, item)

source code 
Validate item and insert.
Overrides: list.insert