Package schrodinger :: Module project :: Class PropertyDictionary
[hide private]
[frames] | no frames]

Class PropertyDictionary

object --+    
         |    
      dict --+
             |
            PropertyDictionary

A dictionary of properties which can be indexed by dataname or column name (the name visible in the project).

Instance Methods [hide private]
new empty dictionary

__init__(self, pdict, name_dict)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__getitem__(self, item)
First checks the main dictionary, then checks the name dictionary for the item.
 
__setitem__(self, item, value)
Checks if this looks like a dataname.
True if D has a key k, else False
has_key(self, key)

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

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]

__init__(self, pdict, name_dict)
(Constructor)

 

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

Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

__getitem__(self, item)
(Indexing operator)

 

First checks the main dictionary, then checks the name dictionary for the item.

Overrides: dict.__getitem__

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

 

Checks if this looks like a dataname. If so, then it adds the item directly. If not, then it checks if it is a column name (often called the user name - the name visible in the table). If it finds the user name, then it adds the item directly. If not, then it constructs a dataname based on the type of the item.

Overrides: dict.__setitem__

has_key(self, key)

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