Knowledge of the object we know that the instance has only data properties in memory, which is exactly the data in the
Init constructor, and does not include other data attributes in the class. The classes have both data properties in the
Init constructor and data that are not in the
Init constructor, as well as the function properties in the class.
Why design it like this? Because we can instantiate a different object through the class, if all the properties of the class are stored in the memory of the instance at this time, then all the function properties of the class will be stored in memory repeatedly, which will greatly waste the memory of the computer. All when the individual instances need to go to the class to take the corresponding function properties, so that the need to meet the function, but also save the memory space.
So, we can be sure that, with an instance, we can access all the properties in the class, but the class has different access to the instance's properties. A class has both a data property and a function property, whereas an instance has only data properties.
Python_ class-to-instance attribute relationships