Chapter 6. Object-Oriented Programming
- IntroductionRecipe 6.1.
Converting Among Temperature ScalesRecipe 6.2.
Defining ConstantsRecipe 6.3.
Restricting Attribute SettingRecipe 6.4.
Chaining Dictionary LookupsRecipe 6.5.
Delegating Automatically as an Alternative to InheritanceRecipe 6.6.
Delegating Special Methods in ProxiesRecipe 6.7.
Implementing Tuples with Named ItemsRecipe 6.8.
Avoiding Boilerplate Accessors for PropertiesRecipe 6.9.
Making a Fast Copy of an ObjectRecipe 6.10.
Keeping References to Bound Methods Without Inhibiting Garbage CollectionRecipe 6.11.
Implementing a Ring BufferRecipe 6.12.
Checking an Instance for Any State ChangesRecipe 6.13.
Checking Whether an Object Has Necessary AttributesRecipe 6.14.
Implementing the State Design PatternRecipe 6.15.
Implementing the "Singleton" Design PatternRecipe 6.16.
Avoiding the "Singleton" Design Pattern with the Borg IdiomRecipe 6.17.
Implementing the Null Object Design PatternRecipe 6.18.
Automatically Initializing Instance Variables from _ _init_ _ ArgumentsRecipe 6.19.
Calling a Superclass _ _init_ _ Method If It ExistsRecipe 6.20.
Using Cooperative Supercalls Concisely and Safely