Here is a solution even more outlandish than the one offered by pythonm:
class Foo(object):
def __init__(self, d):
self.__dict__ = d
Instead of using inst.d, use inst.__dict__ directly. An added benefit is that new keys added to d automatically become attributes. That's as dynamic as it gets.