Package schrodinger :: Package infra :: Module mmim :: Class MMIMDict
[hide private]
[frames] | no frames]

Class MMIMDict

UserDict.DictMixin --+
                     |
                    MMIMDict

A class for setting and getting MMIM keyword values. Given an MMIM handle, create an instance as follows:

mydict = MMIMDict(mmim_handle)

Then set any keywords:

mydict[<keywordname>] = <value>

Instance Methods [hide private]
 
__init__(self, handle)
Create an instance from the given MMIM handle.
 
__getitem__(self, key)
Return the value stored in the MMIM handle for the given key (integer or string).
 
__setitem__(self, key, value)
Set the value for the provided key (integer or string) to <value>.
 
__delitem__(self, key)
 
keys(self)
 
_get_handlers_for_key(self, key)
Retrieve the mmim functions to use in getting and setting the provided key (integer or string).

Inherited from UserDict.DictMixin: __cmp__, __contains__, __iter__, __len__, __repr__, clear, get, has_key, items, iteritems, iterkeys, itervalues, pop, popitem, setdefault, update, values

Method Details [hide private]

__getitem__(self, key)
(Indexing operator)

 

Return the value stored in the MMIM handle for the given key (integer or string). Note that if no explicit setting has been made for a keyword that the default value will be returned.

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

 

Set the value for the provided key (integer or string) to <value>. If the key type is an MMIM arglist (array), then the value provided must be an list with elements of the proper type.

_get_handlers_for_key(self, key)

 

Retrieve the mmim functions to use in getting and setting the provided key (integer or string).

Returns a tuple of key ID and converter/getter/setter functions.