Package csb :: Package core :: Class BaseCollectionContainer
[frames] | no frames]

Class BaseCollectionContainer

source code

     object --+    
              |    
AbstractIndexer --+
                  |
                 BaseCollectionContainer
Known Subclasses:

Base class which defines the behavior of a read-only collection container.


Note: Methods for editing an existing collection are also defined in the base class, but left internal on purpose. Subclasses which are supposed to be write-enabled containers must provide their own public methods for editing which might do some custom work and then finally call any of the internal methods in the base class to do the real data editing.

Instance Methods
 
__bool__(self) source code
 
__contains__(self, item) source code
 
__getitem__(self, i) source code
 
__init__(self, items=None, type=None, start_index=0)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__iter__(self) source code
 
__len__(self) source code
 
__nonzero__(self) source code
 
__repr__(self)
repr(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties
  last_index
  length
  start_index

Inherited from object: __class__

Method Details

__getitem__(self, i)
(Indexing operator)

source code 
Overrides: AbstractIndexer.__getitem__

__init__(self, items=None, type=None, start_index=0)
(Constructor)

source code 

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

Parameters:
  • items (list) - initialization list
  • type (type) - if defined, makes the container type-safe
  • start_index (int) - the index of the zero element
Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

Property Details

last_index

Get Method:
unreachable.last_index(self)

length

Get Method:
unreachable.length(self)

start_index

Get Method:
unreachable.start_index(self)