If my understanding of the Python data model is correct, both classes and class instances have associated __dict__ objects which contain all the attributes. Ho
__dict__
Instances of types defined in C don't have a __dict__ attribute by default.
Just to add to this:
You can get the equivalent of a read only __dict__ using this:
{s:getattr(x,s) for x in dir(x)}