Is it possible to create an object from a dictionary in python in such a way that each key is an attribute of that object?
Something like this:
d =
say for example
class A(): def __init__(self): self.x=7 self.y=8 self.z="name"
if you want to set the attributes at once
d = {'x':100,'y':300,'z':"blah"} a = A() a.__dict__.update(d)