Type vs. Classes/Instances
Unlike languages such as Java, Python standard types are not classes and variables are not instances of such classes. Rather, they are simply primitive types that do not allow for direct derivation. (As it turns out, a class is simply a specific type of primitive built-in that does allow for derivation.)
Python supports a fixed number of built-in types; thus, even instances themselves are of a singular type ("instance"), and classes are all of type "class." (Also review the Core Note earlier in this chapter which posed the issue of why instances are all of the same type.)
Subclassing of standard types is not possible, though often desired. Python provides for some elegant solutions, one of which is to create a new class which has the behavior of a standard type. This allows for the most flexibility because you are in control of your new type at all times. The other solution allows for the use of a pre-existing type by "wrapping" a standard type in a class. (We will address wrapping in Section 13.15). By "wrapping," we mean provide the standard type as the data object of the class and provide accessor methods which allow for the same type of functionality. This is also a perfect mechanism for designing and developing a custom data type for an application, which will be our focus for the upcoming section.