Chapter 6. Object-Oriented Programming


    Introduction

    Recipe 6.1.  Converting Among Temperature Scales

    Recipe 6.2.  Defining Constants

    Recipe 6.3.  Restricting Attribute Setting

    Recipe 6.4.  Chaining Dictionary Lookups

    Recipe 6.5.  Delegating Automatically as an Alternative to Inheritance

    Recipe 6.6.  Delegating Special Methods in Proxies

    Recipe 6.7.  Implementing Tuples with Named Items

    Recipe 6.8.  Avoiding Boilerplate Accessors for Properties

    Recipe 6.9.  Making a Fast Copy of an Object

    Recipe 6.10.  Keeping References to Bound Methods Without Inhibiting Garbage Collection

    Recipe 6.11.  Implementing a Ring Buffer

    Recipe 6.12.  Checking an Instance for Any State Changes

    Recipe 6.13.  Checking Whether an Object Has Necessary Attributes

    Recipe 6.14.  Implementing the State Design Pattern

    Recipe 6.15.  Implementing the "Singleton" Design Pattern

    Recipe 6.16.  Avoiding the "Singleton" Design Pattern with the Borg Idiom

    Recipe 6.17.  Implementing the Null Object Design Pattern

    Recipe 6.18.  Automatically Initializing Instance Variables from _ _init_ _ Arguments

    Recipe 6.19.  Calling a Superclass _ _init_ _ Method If It Exists

    Recipe 6.20.  Using Cooperative Supercalls Concisely and Safely



Python Cookbook
Python Cookbook
ISBN: 0596007973
EAN: 2147483647
Year: 2004
Pages: 420

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net