This is a note about classic classes in Python. We can create classes of the old (pre 2.2) kind by using a plain class statement.
Example 3.2. Examining classic classes
A class statement
specifying no bases creates a classic class
Remember that to create a new-style class you must
Its type is an object we haven't seen before (in this book).
The type of classic
classes is an object called
It looks and smells like just another type object.
types.ClassType object is in some ways an
<type 'type'>. Instances of this object (classic classes) are
types themselves. The rules of attribute access are different for
classic classes and new-style classes. The
types.ClassType object exists for backward
compatibility and may not exist in future versions of Python. Other
sections of this book should not be applied to classic classes.
Comment on this book here: discussion page. I appreciate feedback!
That's all, folks!