Chapter 6. Basics of Classes and Objects
In this chapter, we will look at the following recipes:
Using a class to encapsulate data and processing
Designing classes with lots of processing
Designing classes with little unique processing
Optimizing small objects with __slots__
Using more sophisticated collections
Extending a collection – a list that does statistics
Using properties for lazy attributes
Using settable properties to update eager attributes