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

Class BaseDictionaryContainer

source code

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

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


Note: Methods for editing an existing dictionary 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, key) source code
 
__init__(self, items=None, restrict=None)
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
 
keys(self) source code

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

Properties
  length

Inherited from object: __class__

Method Details

__getitem__(self, key)
(Indexing operator)

source code 
Overrides: AbstractIndexer.__getitem__

__init__(self, items=None, restrict=None)
(Constructor)

source code 

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

Parameters:
  • items - an initialization dictionary
  • restrict - a list of keys allowed for this dictionary
Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

Property Details

length

Get Method:
unreachable.length(self)