What is the difference between class and instance attributes?

There is a significant semantic difference (beyond performance considerations): when the attribute is defined on the instance (which is what we usually do), there can be multiple objects referred to. Each gets a totally separate version of that attribute. when the attribute is defined on the class, there is only one underlying object referred to, … Read more