Index

SYMBOL A B C D E F G H i J K L M N O P Q R S T U V W X Z Gadfly garbage collection cyclic, avoiding debugging maintaining references to bound methods without inhibiting gc module genetic sequencing information, archiving, relational database design for get method extracting subsets from dictionaries lists and values from dictionaries getattr method 2nd getitem method 2nd getitems method 2nd getQualifiedURL function getS method getstate method GetSubList method GetText method getvalue method...

Organization

Each chapter is devoted to a particular kind of recipe, such as algorithms, text processing, databases, and so on. The 1st edition had 17 chapters. There have been improvements to Python, both language and library, and to the corpus of recipes the Python community has posted to the cookbook site, that convinced us to add three entirely new chapters on the iterators and generators introduced in Python 2.3 on Python's support for time and money operations, both old and...

With this enriched version of Borg the examples output changes to

The Singleton Design Pattern has a catchy name, but unfortunately it also has the wrong focus for most purposes it focuses on object identity, rather than on object state and behavior. The Borg design nonpattern makes all instances share state instead, and Python makes implementing this idea a snap. In most cases in which you might think of using Singleton or Borg, you don't really need either of them. Just write a Python module, with functions and module-global variables, instead of defining a...