I am trying to \'destructure\' a dictionary and associate values with variables names after its keys. Something like
params = {\'a\':1,\'b\':2} a,b = params.
Well, if you want these in a class you can always do this:
class AttributeDict(dict): def __init__(self, *args, **kwargs): super(AttributeDict, self).__init__(*args, **kwargs) self.__dict__.update(self) d = AttributeDict(a=1, b=2)