Some questions are probably popping up in your head at this point. Or maybe they aren't, but I'll answer them anyway:
How does Python really create a new object?
Internally, when Python creates a new object, it always
uses a type and creates an instance of that object. Specifically it
When using instantiation, I specify the type, but how does Python know which type to use when I use subclassing?
It looks at the base class that you specified, and uses
its type as the type for the new object. In the example Example 2.4, “Creating new objects by subclassing” ,
A little thought reveals that under most circumstances, any
Advanced Material Ahead
Advanced discussion ahead, tread with caution, or jump straight to the next section.