class documentation

class DictClass(dict):

Constructor: DictClass(*args, **kwargs)

View In Hierarchy

A class wrapped over dict to use class .-notation.

Not clear whether tab completion works?

>>> from cma.utilities.utils import DictClass
>>> dict_ = dict((2 * char, char) for char in 'abcd')
>>> d = DictClass(dict_)
>>> assert d.__dict__ == dict_ == d
>>> assert d.aa == 'a' and len(d) == 4
>>> d.new = 33
>>> assert 'new' in d
>>> d['nnew'] = 44
>>> assert d.nnew == 44
>>> assert len(d) == 6
Method __dir__ Undocumented
Method __init__ Undocumented
Instance Variable __dict__ Undocumented
def __dir__(self):

Undocumented

def __init__(self, *args, **kwargs):

Undocumented

__dict__ =

Undocumented