Chapter 3. Syntax Best PracticesAbove the Class Level
We will now focus on syntax best practices for classes. It is not intended to cover design patterns here, as they will be discussed in Chapter 14. This chapter gives an overview of the advanced Python syntax to manipulate and enhance the class code. Though the Python object model is still evolving in some subtle, but fundamental ways in the 2x series, it still presents some of the language internals to fully understand how classes work. This is quite important to avoid some common pitfalls and misuses of the object model.
The following topics will be discussed:
Subclassing built-in types
Accessing methods from super classes
Subclassing Built-in Types
Python 2.2 introduced the ...