class documentation
A class wrapped over dict
to use class .-notation.
>>> from cma.utilities.utils import DictClass >>> dict_ = dict((3 * c, c) for c in 'abcd') >>> as_class = DictClass(dict_) >>> assert as_class.__dict__ == dict_ == as_class >>> assert as_class.aaa == 'a' >>> as_class.new = 33 >>> assert 'new' in as_class >>> as_class['nnew'] = 44 >>> assert as_class.nnew == 44 >>> assert len(as_class) == 6