Package qubx :: Module types :: Class OverridingDict
[hide private]
[frames] | no frames]

Class OverridingDict

object --+    
         |    
      dict --+
             |
            OverridingDict

"Overrides" the base dict so keys are looked up first here, then if not found, in base dict.

Instance Methods [hide private]
True if D has a key k, else False
__contains__(self, key)
 
__getitem__(self, key)
x[y]
new empty dictionary

__init__(self, base=None, *args, **kw)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
D[k] if k in D, else d
get(self, key)
d defaults to None.
True if D has a key k, else False
has_key(self, key)
list of D's keys
keys(self)

Inherited from dict: __cmp__, __delitem__, __eq__, __ge__, __getattribute__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, __sizeof__, clear, copy, fromkeys, items, iteritems, iterkeys, itervalues, pop, popitem, setdefault, update, values

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

Class Variables [hide private]

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__contains__(self, key)
(In operator)

 
Returns: True if D has a key k, else False
Overrides: dict.__contains__
(inherited documentation)

__getitem__(self, key)
(Indexing operator)

 

x[y]

Overrides: dict.__getitem__
(inherited documentation)

__init__(self, base=None, *args, **kw)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

get(self, key)

 

d defaults to None.

Returns: D[k] if k in D, else d
Overrides: dict.get
(inherited documentation)

has_key(self, key)

 
Returns: True if D has a key k, else False
Overrides: dict.has_key
(inherited documentation)

keys(self)

 
Returns: list of D's keys
Overrides: dict.keys
(inherited documentation)