This works:
class MyClass(object):
pass
someinstance = MyClass()
someinstance.myattribute = 42
print someinstance.myattribute
>>> 42
But this doesn't:
someinstance = object()
someinstance.myattribute = 42
>>> AttributeError: 'object' object has no attribute 'myattribute'
Why? I've got a feeling, that this is related to object being a built-in class, but I find this unsatisfactory, since I changed nothing in the declaration of MyClass.