Add the DataHolder class

This commit is contained in:
Martin Gracik 2010-11-23 12:49:02 +01:00
parent 60740ae505
commit 485fad16e5

View File

@ -47,3 +47,12 @@ class BaseLoraxClass(object):
def pdebug(self, msg, file=sys.stdout): def pdebug(self, msg, file=sys.stdout):
self.output.debug(msg, file) self.output.debug(msg, file)
class DataHolder(dict):
def __getattr__(self, attr):
return self[attr]
def __setattr__(self, attr, value):
self[attr] = value