I want to create a dynamic object (inside another object) in Python and then add attributes to it.
I tried:
obj = someobject obj.a = object() setattr
Now you can do (not sure if it's the same answer as evilpie):
MyObject = type('MyObject', (object,), {}) obj = MyObject() obj.value = 42