Module fullscreenwrapper2 :: Class BaseDict
[hide private]
[frames] | no frames]

Class BaseDict

source code

object --+    
         |    
      dict --+
             |
            BaseDict

implements a dictionary that can be accessed by BaseDict[key] as well as by BaseDict.key to allow more pythonic access credits: BaseDict pattern at http://code.activestate.com/recipes/473790/ under PSF license

Instance Methods [hide private]
new empty dictionary

__init__(self, data=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__setattr__(self, name, val)
x.__setattr__('name', value) <==> x.name = value
source code
 
__getattr__(self, name) source code
 
setDict(self, name, val)
setDict(name, val): Assign *val* to the key *name* of __dict__.
source code
 
getDict(self)
Return the internal __dict__.
source code
 
setItem(self, name, val)
Set the value of dict key *name* to *val*.
source code
 
__getstate__(self)
Needed for cPickle in .copy()
source code
 
__setstate__(self, dict)
Needed for cPickle in .copy()
source code
a shallow copy of D
copy(self)
Return a copy.
source code

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, __sizeof__, clear, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values, viewitems, viewkeys, viewvalues

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

Class Variables [hide private]

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, data=None)
(Constructor)

source code 

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

Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

__setattr__(self, name, val)

source code 

x.__setattr__('name', value) <==> x.name = value

Overrides: object.__setattr__
(inherited documentation)

setDict(self, name, val)

source code 

setDict(name, val): Assign *val* to the key *name* of __dict__. >>> bd.setDict('height', 160) {} >>> bd.getDict()['height'] 160

getDict(self)

source code 

Return the internal __dict__. >>> bd.setDict('height', 160) {} >>> bd.getDict()['height'] 160

setItem(self, name, val)

source code 

Set the value of dict key *name* to *val*. Note this dict is not the __dict__.

copy(self)

source code 

Return a copy.

Returns: a shallow copy of D
Overrides: dict.copy