Python 3 Patterns & Idioms / html / index.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Python 3 Patterns, Recipes and Idioms &mdash; Python 3 Patterns, Recipes and Idioms</title>
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '1.0',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/favicon.ico"/>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="" />
    <link rel="next" title="Contributors" href="Contributors.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="Contributors.html" title="Contributors"
             accesskey="N">next</a> |</li>
        <li><a href="">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li> 
      </ul>
    </div>  
    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="python-3-patterns-recipes-and-idioms">
<h1>Python 3 Patterns, Recipes and Idioms<a class="headerlink" href="#python-3-patterns-recipes-and-idioms" title="Permalink to this headline"></a></h1>
<ul>
<li class="toctree-l1"><a class="reference external" href="Contributors.html">Contributors</a><ul>
<li class="toctree-l2"><a class="reference external" href="Contributors.html#thanks-to">Thanks To</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="ToDo.html">ToDo List</a></li>
<li class="toctree-l1"><a class="reference external" href="ToDo.html#the-remainder-are-from-context-from-the-book">The remainder are from context, from the book.</a></li>
<li class="toctree-l1"><a class="reference external" href="NoteToReaders.html">A Note To Readers</a></li>
<li class="toctree-l1"><a class="reference external" href="Introduction.html">Introduction</a><ul>
<li class="toctree-l2"><a class="reference external" href="Introduction.html#a-team-effort">A Team Effort</a></li>
<li class="toctree-l2"><a class="reference external" href="Introduction.html#not-an-introductory-book">Not an Introductory Book</a></li>
<li class="toctree-l2"><a class="reference external" href="Introduction.html#the-license">The License</a></li>
<li class="toctree-l2"><a class="reference external" href="Introduction.html#the-printed-book">The Printed Book</a></li>
<li class="toctree-l2"><a class="reference external" href="Introduction.html#translations">Translations</a></li>
<li class="toctree-l2"><a class="reference external" href="Introduction.html#my-motives">My Motives</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="TeachingSupport.html">Teaching Support</a></li>
<li class="toctree-l1"><a class="reference external" href="Rules.html">Book Development Rules</a><ul>
<li class="toctree-l2"><a class="reference external" href="Rules.html#contribute-what-you-can">Contribute What You Can</a></li>
<li class="toctree-l2"><a class="reference external" href="Rules.html#don-t-get-attached">Don&#8217;t Get Attached</a></li>
<li class="toctree-l2"><a class="reference external" href="Rules.html#credit">Credit</a></li>
<li class="toctree-l2"><a class="reference external" href="Rules.html#mechanics">Mechanics</a></li>
<li class="toctree-l2"><a class="reference external" href="Rules.html#diagrams">Diagrams</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="DeveloperGuide.html">Developer Guide</a><ul>
<li class="toctree-l2"><a class="reference external" href="DeveloperGuide.html#getting-started-the-easiest-approach">Getting Started: The Easiest Approach</a></li>
<li class="toctree-l2"><a class="reference external" href="DeveloperGuide.html#for-windows-users">For Windows Users</a></li>
<li class="toctree-l2"><a class="reference external" href="DeveloperGuide.html#installing-sphinx">Installing Sphinx</a></li>
<li class="toctree-l2"><a class="reference external" href="DeveloperGuide.html#getting-the-development-branch-of-the-book">Getting the Development Branch of the Book</a></li>
<li class="toctree-l2"><a class="reference external" href="DeveloperGuide.html#building-the-book">Building the Book</a></li>
<li class="toctree-l2"><a class="reference external" href="DeveloperGuide.html#building-the-pdf">Building the PDF</a></li>
<li class="toctree-l2"><a class="reference external" href="DeveloperGuide.html#setting-up-mercurial">Setting up Mercurial</a></li>
<li class="toctree-l2"><a class="reference external" href="DeveloperGuide.html#working-with-bitbucket-and-mercurial">Working with BitBucket and Mercurial</a></li>
<li class="toctree-l2"><a class="reference external" href="DeveloperGuide.html#a-simple-overview-of-editing-and-merging">A Simple Overview Of Editing and Merging</a></li>
<li class="toctree-l2"><a class="reference external" href="DeveloperGuide.html#emacs-for-editing-restructured-text">Emacs for Editing Restructured Text</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="Part1.html">Part I: Foundations</a></li>
<li class="toctree-l1"><a class="reference external" href="QuickPython.html">Quick Python for Programmers</a><ul>
<li class="toctree-l2"><a class="reference external" href="QuickPython.html#scripting-vs-programming">Scripting vs. Programming</a></li>
<li class="toctree-l2"><a class="reference external" href="QuickPython.html#built-in-containers">Built-In Containers</a></li>
<li class="toctree-l2"><a class="reference external" href="QuickPython.html#functions">Functions</a></li>
<li class="toctree-l2"><a class="reference external" href="QuickPython.html#strings">Strings</a></li>
<li class="toctree-l2"><a class="reference external" href="QuickPython.html#classes">Classes</a><ul>
<li class="toctree-l3"><a class="reference external" href="QuickPython.html#inheritance">Inheritance</a></li>
<li class="toctree-l3"><a class="reference external" href="QuickPython.html#constructor-calls">Constructor Calls</a></li>
<li class="toctree-l3"><a class="reference external" href="QuickPython.html#static-fields">Static Fields</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="QuickPython.html#useful-techniques">Useful Techniques</a></li>
<li class="toctree-l2"><a class="reference external" href="QuickPython.html#further-reading">Further Reading</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="UnitTesting.html">Unit Testing &amp; Test-Driven Development</a><ul>
<li class="toctree-l2"><a class="reference external" href="UnitTesting.html#write-tests-first">Write Tests First</a></li>
<li class="toctree-l2"><a class="reference external" href="UnitTesting.html#simple-python-testing">Simple Python Testing</a></li>
<li class="toctree-l2"><a class="reference external" href="UnitTesting.html#a-very-simple-framework">A Very Simple Framework</a></li>
<li class="toctree-l2"><a class="reference external" href="UnitTesting.html#writing-tests">Writing Tests</a></li>
<li class="toctree-l2"><a class="reference external" href="UnitTesting.html#white-box-black-box-tests">White-Box &amp; Black-Box Tests</a></li>
<li class="toctree-l2"><a class="reference external" href="UnitTesting.html#running-tests">Running tests</a></li>
<li class="toctree-l2"><a class="reference external" href="UnitTesting.html#automatically-executing-tests">Automatically Executing Tests</a></li>
<li class="toctree-l2"><a class="reference external" href="UnitTesting.html#exercises">Exercises</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="LanguageChanges.html">Python 3 Language Changes</a></li>
<li class="toctree-l1"><a class="reference external" href="PythonDecorators.html">Decorators</a><ul>
<li class="toctree-l2"><a class="reference external" href="PythonDecorators.html#decorators-vs-the-decorator-pattern">Decorators vs. the Decorator Pattern</a></li>
<li class="toctree-l2"><a class="reference external" href="PythonDecorators.html#history-of-macros">History of Macros</a></li>
<li class="toctree-l2"><a class="reference external" href="PythonDecorators.html#the-goal-of-macros">The Goal of Macros</a></li>
<li class="toctree-l2"><a class="reference external" href="PythonDecorators.html#what-can-you-do-with-decorators">What Can You Do With Decorators?</a></li>
<li class="toctree-l2"><a class="reference external" href="PythonDecorators.html#function-decorators">Function Decorators</a></li>
<li class="toctree-l2"><a class="reference external" href="PythonDecorators.html#slightly-more-useful">Slightly More Useful</a></li>
<li class="toctree-l2"><a class="reference external" href="PythonDecorators.html#using-functions-as-decorators">Using Functions as Decorators</a></li>
<li class="toctree-l2"><a class="reference external" href="PythonDecorators.html#review-decorators-without-arguments">Review: Decorators without Arguments</a></li>
<li class="toctree-l2"><a class="reference external" href="PythonDecorators.html#decorators-with-arguments">Decorators with Arguments</a></li>
<li class="toctree-l2"><a class="reference external" href="PythonDecorators.html#decorator-functions-with-decorator-arguments">Decorator Functions with Decorator Arguments</a></li>
<li class="toctree-l2"><a class="reference external" href="PythonDecorators.html#further-reading">Further Reading</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="GeneratorsIterators.html">Generators, Iterators, and Itertools</a></li>
<li class="toctree-l1"><a class="reference external" href="Comprehensions.html">Comprehensions</a><ul>
<li class="toctree-l2"><a class="reference external" href="Comprehensions.html#techniques">Techniques</a></li>
<li class="toctree-l2"><a class="reference external" href="Comprehensions.html#a-more-complex-example">A More Complex Example</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="CoroutinesAndConcurrency.html">Coroutines &amp; Concurrency</a><ul>
<li class="toctree-l2"><a class="reference external" href="CoroutinesAndConcurrency.html#further-reading">Further Reading</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="Metaclasses.html">Metaclasses</a><ul>
<li class="toctree-l2"><a class="reference external" href="Metaclasses.html#basic-metaclasses">Basic Metaclasses</a></li>
<li class="toctree-l2"><a class="reference external" href="Metaclasses.html#the-metaclass-hook">The Metaclass Hook</a><ul>
<li class="toctree-l3"><a class="reference external" href="Metaclasses.html#the-metaclass-hook-in-python-3">The Metaclass Hook in Python 3</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="Metaclasses.html#example-self-registration-of-subclasses">Example: Self-Registration of Subclasses</a><ul>
<li class="toctree-l3"><a class="reference external" href="Metaclasses.html#using-class-decorators">Using Class Decorators</a></li>
<li class="toctree-l3"><a class="reference external" href="Metaclasses.html#using-the-inspect-module">Using the <strong>inspect</strong> module</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="Metaclasses.html#example-making-a-class-final">Example: Making a Class &#8220;Final&#8221;</a></li>
<li class="toctree-l2"><a class="reference external" href="Metaclasses.html#using-init-vs-new-in-metaclasses">Using <tt class="docutils literal"><span class="pre">__init__</span></tt> vs. <tt class="docutils literal"><span class="pre">__new__</span></tt> in Metaclasses</a></li>
<li class="toctree-l2"><a class="reference external" href="Metaclasses.html#class-methods-and-metamethods">Class Methods and Metamethods</a><ul>
<li class="toctree-l3"><a class="reference external" href="Metaclasses.html#intercepting-class-creation">Intercepting Class Creation</a></li>
<li class="toctree-l3"><a class="reference external" href="Metaclasses.html#a-class-decorator-singleton">A Class Decorator Singleton</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="Metaclasses.html#metaclass-conflicts">Metaclass Conflicts</a></li>
<li class="toctree-l2"><a class="reference external" href="Metaclasses.html#further-reading">Further Reading</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="Jython.html">Jython</a><ul>
<li class="toctree-l2"><a class="reference external" href="Jython.html#installation">Installation</a><ul>
<li class="toctree-l3"><a class="reference external" href="Jython.html#getting-the-trunk">Getting the Trunk</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="Jython.html#scripting">Scripting</a></li>
<li class="toctree-l2"><a class="reference external" href="Jython.html#interpreter-motivation">Interpreter Motivation</a><ul>
<li class="toctree-l3"><a class="reference external" href="Jython.html#creating-a-language">Creating a Language</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="Jython.html#using-java-libraries">Using Java libraries</a><ul>
<li class="toctree-l3"><a class="reference external" href="Jython.html#inheriting-from-java-library-classes">Inheriting from Java library Classes</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="Jython.html#controlling-java-from-jython">Controlling Java from Jython</a><ul>
<li class="toctree-l3"><a class="reference external" href="Jython.html#inner-classes">Inner Classes</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="Jython.html#controlling-the-interpreter">Controlling the Interpreter</a><ul>
<li class="toctree-l3"><a class="reference external" href="Jython.html#putting-data-in">Putting Data In</a></li>
<li class="toctree-l3"><a class="reference external" href="Jython.html#getting-data-out">Getting Data Out</a></li>
<li class="toctree-l3"><a class="reference external" href="Jython.html#multiple-interpreters">Multiple Interpreters</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="Jython.html#creating-java-classes-with-jython">Creating Java classes with Jython</a><ul>
<li class="toctree-l3"><a class="reference external" href="Jython.html#building-java-classes-from-python">Building Java Classes from Python</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="Jython.html#summary">Summary</a></li>
<li class="toctree-l2"><a class="reference external" href="Jython.html#exercises">Exercises</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="Part2.html">Part II: Idioms</a></li>
<li class="toctree-l1"><a class="reference external" href="MachineDiscovery.html">Discovering the Details About Your Platform</a></li>
<li class="toctree-l1"><a class="reference external" href="CanonicalScript.html">A Canonical Form for Command-Line Programs</a></li>
<li class="toctree-l1"><a class="reference external" href="Messenger.html">Messenger/Data Transfer Object</a></li>
<li class="toctree-l1"><a class="reference external" href="Part3.html">Part III: Patterns</a></li>
<li class="toctree-l1"><a class="reference external" href="PatternConcept.html">The Pattern Concept</a><ul>
<li class="toctree-l2"><a class="reference external" href="PatternConcept.html#what-is-a-pattern">What is a Pattern?</a></li>
<li class="toctree-l2"><a class="reference external" href="PatternConcept.html#classifying-patterns">Classifying Patterns</a></li>
<li class="toctree-l2"><a class="reference external" href="PatternConcept.html#pattern-taxonomy">Pattern Taxonomy</a></li>
<li class="toctree-l2"><a class="reference external" href="PatternConcept.html#design-structures">Design Structures</a></li>
<li class="toctree-l2"><a class="reference external" href="PatternConcept.html#design-principles">Design Principles</a></li>
<li class="toctree-l2"><a class="reference external" href="PatternConcept.html#further-reading">Further Reading</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="Singleton.html">The Singleton</a><ul>
<li class="toctree-l2"><a class="reference external" href="Singleton.html#exercises">Exercises</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="AppFrameworks.html">Building Application Frameworks</a><ul>
<li class="toctree-l2"><a class="reference external" href="AppFrameworks.html#template-method">Template Method</a></li>
<li class="toctree-l2"><a class="reference external" href="AppFrameworks.html#exercises">Exercises</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="Fronting.html">Fronting for an Implementation</a><ul>
<li class="toctree-l2"><a class="reference external" href="Fronting.html#proxy">Proxy</a></li>
<li class="toctree-l2"><a class="reference external" href="Fronting.html#state">State</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="StateMachine.html">StateMachine</a><ul>
<li class="toctree-l2"><a class="reference external" href="StateMachine.html#table-driven-state-machine">Table-Driven State Machine</a><ul>
<li class="toctree-l3"><a class="reference external" href="StateMachine.html#the-state-class">The State Class</a></li>
<li class="toctree-l3"><a class="reference external" href="StateMachine.html#conditions-for-transition">Conditions for Transition</a></li>
<li class="toctree-l3"><a class="reference external" href="StateMachine.html#transition-actions">Transition Actions</a></li>
<li class="toctree-l3"><a class="reference external" href="StateMachine.html#the-table">The Table</a></li>
<li class="toctree-l3"><a class="reference external" href="StateMachine.html#the-basic-machine">The Basic Machine</a></li>
<li class="toctree-l3"><a class="reference external" href="StateMachine.html#simple-vending-machine">Simple Vending Machine</a></li>
<li class="toctree-l3"><a class="reference external" href="StateMachine.html#testing-the-machine">Testing the Machine</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="StateMachine.html#tools">Tools</a></li>
<li class="toctree-l2"><a class="reference external" href="StateMachine.html#exercises">Exercises</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="Decorator.html">Decorator: Dynamic Type Selection</a><ul>
<li class="toctree-l2"><a class="reference external" href="Decorator.html#basic-decorator-structure">Basic Decorator Structure</a></li>
<li class="toctree-l2"><a class="reference external" href="Decorator.html#a-coffee-example">A Coffee Example</a></li>
<li class="toctree-l2"><a class="reference external" href="Decorator.html#class-for-each-combination">Class for Each Combination</a></li>
<li class="toctree-l2"><a class="reference external" href="Decorator.html#the-decorator-approach">The Decorator Approach</a></li>
<li class="toctree-l2"><a class="reference external" href="Decorator.html#compromise">Compromise</a></li>
<li class="toctree-l2"><a class="reference external" href="Decorator.html#other-considerations">Other Considerations</a></li>
<li class="toctree-l2"><a class="reference external" href="Decorator.html#further-reading">Further Reading</a></li>
<li class="toctree-l2"><a class="reference external" href="Decorator.html#exercises">Exercises</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="Iterators.html">Iterators: Decoupling Algorithms from Containers</a><ul>
<li class="toctree-l2"><a class="reference external" href="Iterators.html#type-safe-iterators">Type-Safe Iterators</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="Factory.html">Factory: Encapsulating Object Creation</a><ul>
<li class="toctree-l2"><a class="reference external" href="Factory.html#simple-factory-method">Simple Factory Method</a><ul>
<li class="toctree-l3"><a class="reference external" href="Factory.html#preventing-direct-creation">Preventing direct creation</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="Factory.html#polymorphic-factories">Polymorphic Factories</a></li>
<li class="toctree-l2"><a class="reference external" href="Factory.html#abstract-factories">Abstract Factories</a></li>
<li class="toctree-l2"><a class="reference external" href="Factory.html#exercises">Exercises</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="FunctionObjects.html">Function Objects</a><ul>
<li class="toctree-l2"><a class="reference external" href="FunctionObjects.html#command-choosing-the-operation-at-runtime">Command: Choosing the Operation at Runtime</a></li>
<li class="toctree-l2"><a class="reference external" href="FunctionObjects.html#strategy-choosing-the-algorithm-at-runtime">Strategy: Choosing the Algorithm at Runtime</a></li>
<li class="toctree-l2"><a class="reference external" href="FunctionObjects.html#chain-of-responsibility">Chain of Responsibility</a></li>
<li class="toctree-l2"><a class="reference external" href="FunctionObjects.html#exercises">Exercises</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="ChangeInterface.html">Changing the Interface</a><ul>
<li class="toctree-l2"><a class="reference external" href="ChangeInterface.html#adapter">Adapter</a></li>
<li class="toctree-l2"><a class="reference external" href="ChangeInterface.html#fa-ade">Façade</a></li>
<li class="toctree-l2"><a class="reference external" href="ChangeInterface.html#exercises">Exercises</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="TableDriven.html">Table-Driven Code: Configuration Flexibility</a><ul>
<li class="toctree-l2"><a class="reference external" href="TableDriven.html#table-driven-code-using-anonymous-inner-classes">Table-Driven Code Using Anonymous Inner Classes</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="Observer.html">Observer</a><ul>
<li class="toctree-l2"><a class="reference external" href="Observer.html#observing-flowers">Observing Flowers</a><ul>
<li class="toctree-l3"><a class="reference external" href="Observer.html#a-visual-example-of-observers">A Visual Example of Observers</a></li>
<li class="toctree-l3"><a class="reference external" href="Observer.html#exercises">Exercises</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="MultipleDispatching.html">Multiple Dispatching</a></li>
<li class="toctree-l1"><a class="reference external" href="Visitor.html">Visitor</a><ul>
<li class="toctree-l2"><a class="reference external" href="Visitor.html#exercises">Exercises</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="PatternRefactoring.html">Pattern Refactoring</a><ul>
<li class="toctree-l2"><a class="reference external" href="PatternRefactoring.html#simulating-the-trash-recycler">Simulating the Trash Recycler</a></li>
<li class="toctree-l2"><a class="reference external" href="PatternRefactoring.html#improving-the-design">Improving the Design</a><ul>
<li class="toctree-l3"><a class="reference external" href="PatternRefactoring.html#make-more-objects">&#8220;Make More Objects&#8221;</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="PatternRefactoring.html#a-pattern-for-prototyping-creation">A Pattern for Prototyping Creation</a><ul>
<li class="toctree-l3"><a class="reference external" href="PatternRefactoring.html#trash-subclasses"><strong>Trash</strong> Subclasses</a></li>
<li class="toctree-l3"><a class="reference external" href="PatternRefactoring.html#parsing-trash-from-an-external-file">Parsing <strong>Trash</strong> from an External File</a></li>
<li class="toctree-l3"><a class="reference external" href="PatternRefactoring.html#recycling-with-prototyping">Recycling with Prototyping</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="PatternRefactoring.html#abstracting-usage">Abstracting Usage</a></li>
<li class="toctree-l2"><a class="reference external" href="PatternRefactoring.html#multiple-dispatching">Multiple Dispatching</a><ul>
<li class="toctree-l3"><a class="reference external" href="PatternRefactoring.html#implementing-the-double-dispatch">Implementing the Double Dispatch</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="PatternRefactoring.html#the-visitor-pattern">The <em>Visitor</em> Pattern</a><ul>
<li class="toctree-l3"><a class="reference external" href="PatternRefactoring.html#a-reflective-decorator">A Reflective Decorator</a></li>
<li class="toctree-l3"><a class="reference external" href="PatternRefactoring.html#more-coupling">More Coupling?</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="PatternRefactoring.html#rtti-considered-harmful">RTTI Considered Harmful?</a></li>
<li class="toctree-l2"><a class="reference external" href="PatternRefactoring.html#summary">Summary</a></li>
<li class="toctree-l2"><a class="reference external" href="PatternRefactoring.html#exercises">Exercises</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="Projects.html">Projects</a><ul>
<li class="toctree-l2"><a class="reference external" href="Projects.html#rats-mazes">Rats &amp; Mazes</a><ul>
<li class="toctree-l3"><a class="reference external" href="Projects.html#other-maze-resources">Other Maze Resources</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><a class="reference external" href="genindex.html"><em>Index</em></a></li>
<li><a class="reference external" href="search.html"><em>Search Page</em></a></li>
</ul>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="">
              <img class="logo" src="_static/cover.png" alt="Logo"/>
            </a></p>
    <font color="Red">This book is in early development; you will find parts that are incorrect &amp; incomplete.</font>
    
            <h3><a href="">Table Of Contents</a></h3>
            <ul>
<li><a class="reference external" href="">Python 3 Patterns, Recipes and Idioms</a><ul>
</ul>
</li>
<li><a class="reference external" href="#indices-and-tables">Indices and tables</a></li>
</ul>


            <h4>Next topic</h4>
            <p class="topless"><a href="Contributors.html"
                                  title="next chapter">Contributors</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="_sources/index.txt"
                     rel="nofollow">Show Source</a></li>
            </ul>
    
	  <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
	      <p style="font-size: 90%">Enter search terms or a module, class or function name.</p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
    <h4><a href="http://www.mindviewinc.com/Books/Python3Patterns/Index.php">Project Homepage</a></h4>
    <h4><a href="http://www.bitbucket.org/BruceEckel/python-3-patterns-idioms/issues/">Corrections/Suggestions</a></h4>
    <h4><a href="http://www.mindviewinc.com/Consulting/Index.php">Consulting &amp; Training</a></h4><br><br>

        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="Contributors.html" title="Contributors"
             accesskey="N">next</a> |</li>
        <li><a href="">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright 2008, Creative Commons Attribution-Share Alike 3.0.
      Last updated on Jan 24, 2009.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.
    </div>
  </body>
</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.