1
# gozerbot/utils/lazydict.py
5
""" a lazydict allows dotted access to a dict .. dict.key """
9
""" Lazy dict allows dotted access to a dict """
12
def __getattr__(self, attr, default={}):
14
""" get attribute .. if not available init to default. """
16
if not self.has_key(attr):
21
def __setattr__(self, attr, value):
23
""" set attribute. """
29
""" return a string representation of the dict """
33
for item, value in cp.iteritems():
34
res += "%r=%r " % (item, value)