Commits

BruceEckel  committed fb11e83

Changed book name. Changed logo to new book cover. Added section 'Emacs for Editing Restructured Text' to Developer Guide.

  • Participants
  • Parent commits 42f7281

Comments (0)

Files changed (74)

File html/AppFrameworks.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Building Application Frameworks &mdash; Python 3 Patterns & Idioms</title>
+    <title>Building Application Frameworks &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Fronting for an Implementation" href="Fronting.html" />
     <link rel="prev" title="The Singleton" href="Singleton.html" />
   </head>
         <li class="right" >
           <a href="Singleton.html" title="The Singleton"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
 override) in order to do its job, but it is usually called only as part of an
 initialization process (and thus the client programmer isn&#8217;t necessarily able to
 call it directly):</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># appFrameworks/TemplateMethod.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># AppFrameworks/TemplateMethod.py</span>
 <span class="c"># Simple demonstration of Template Method.</span>
 
 <span class="k">class</span> <span class="nc">ApplicationFramework</span><span class="p">:</span>
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="Singleton.html" title="The Singleton"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/CanonicalScript.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>A Canonical Form for Command-Line Programs &mdash; Python 3 Patterns & Idioms</title>
+    <title>A Canonical Form for Command-Line Programs &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Messenger/Data Transfer Object" href="Messenger.html" />
     <link rel="prev" title="Discovering the Details About Your Platform" href="MachineDiscovery.html" />
   </head>
         <li class="right" >
           <a href="MachineDiscovery.html" title="Discovering the Details About Your Platform"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="MachineDiscovery.html" title="Discovering the Details About Your Platform"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/ChangeInterface.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Changing the Interface &mdash; Python 3 Patterns & Idioms</title>
+    <title>Changing the Interface &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Table-Driven Code: Configuration Flexibility" href="TableDriven.html" />
     <link rel="prev" title="Function Objects" href="FunctionObjects.html" />
   </head>
         <li class="right" >
           <a href="FunctionObjects.html" title="Function Objects"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
 <p>When you&#8217;ve got <em>this</em>, and you need <em>that</em>, <em>Adapter</em> solves the problem. The
 only requirement is to produce a <em>that</em>, and there are a number of ways you can
 accomplish this adaptation:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># changeInterface/Adapter.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># ChangeInterface/Adapter.py</span>
 <span class="c"># Variations on the Adapter pattern.</span>
 
 <span class="k">class</span> <span class="nc">WhatIHave</span><span class="p">:</span>
 <p>Façade is often implemented as singleton abstract factory. Of course, you can
 easily get this effect by creating a class containing <strong>static</strong> factory
 methods:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># changeInterface/Facade.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># ChangeInterface/Facade.py</span>
 <span class="k">class</span> <span class="nc">A</span><span class="p">:</span>
     <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span> <span class="k">pass</span>
 <span class="k">class</span> <span class="nc">B</span><span class="p">:</span>
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="FunctionObjects.html" title="Function Objects"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/Comprehensions.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Comprehensions &mdash; Python 3 Patterns & Idioms</title>
+    <title>Comprehensions &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Coroutines &amp; Concurrency" href="CoroutinesAndConcurrency.html" />
     <link rel="prev" title="Generators, Iterators, and Itertools" href="GeneratorsIterators.html" />
   </head>
         <li class="right" >
           <a href="GeneratorsIterators.html" title="Generators, Iterators, and Itertools"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
 <h2>A More Complex Example<a class="headerlink" href="#a-more-complex-example" title="Permalink to this headline">¶</a></h2>
 <div class="admonition note">
 <p class="first admonition-title">Note</p>
-<p class="last">This is still under development. After finishing, it will get a full
-description of all parts.</p>
+<p class="last">This will get a full description of all parts.</p>
 </div>
 <div class="highlight-python"><div class="highlight"><pre><span class="c"># CodeManager.py</span>
 <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">TODO: Break check into two pieces?</span>
 <span class="sd">TODO: update() is still only in test mode; doesn&#39;t actually work yet.</span>
 
-<span class="sd">Extracts, checks and updates code examples in ReST files.</span>
+<span class="sd">Extracts, displays, checks and updates code examples in restructured text (.rst)</span>
+<span class="sd">files.</span>
 
 <span class="sd">You can just put in the codeMarker and the (indented) first line (containing the</span>
-<span class="sd">file path) into your ReST file, then run the update program to automatically</span>
-<span class="sd">insert the rest of the file.</span>
+<span class="sd">file path) into your restructured text file, then run the update program to</span>
+<span class="sd">automatically insert the rest of the file.</span>
 <span class="sd">&quot;&quot;&quot;</span>
 <span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">re</span><span class="o">,</span> <span class="nn">sys</span><span class="o">,</span> <span class="nn">shutil</span><span class="o">,</span> <span class="nn">inspect</span><span class="o">,</span> <span class="nn">difflib</span>
 
     <span class="nd">@staticmethod</span>
     <span class="k">def</span> <span class="nf">extract</span><span class="p">(</span><span class="n">language</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Pull the code listings from the .rst files and write each</span>
-<span class="sd">        listing into its own file.</span>
+<span class="sd">        Pull the code listings from the .rst files and write each listing into</span>
+<span class="sd">        its own file. Will not overwrite if code files and .rst files disagree</span>
+<span class="sd">        unless you say &quot;extract -force&quot;.</span>
 <span class="sd">        &quot;&quot;&quot;</span>
+        <span class="n">force</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">)</span> <span class="o">==</span> <span class="mf">3</span> <span class="ow">and</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">2</span><span class="p">]</span> <span class="o">==</span> <span class="s">&#39;-force&#39;</span>
         <span class="n">paths</span> <span class="o">=</span> <span class="n">set</span><span class="p">()</span>
-        <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">restFiles</span><span class="p">:</span>
-            <span class="k">for</span> <span class="n">listing</span> <span class="ow">in</span> <span class="n">language</span><span class="o">.</span><span class="n">listings</span><span class="o">.</span><span class="n">findall</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="n">f</span><span class="p">)</span><span class="o">.</span><span class="n">read</span><span class="p">()):</span>
-                <span class="n">listing</span> <span class="o">=</span> <span class="n">shift</span><span class="p">(</span><span class="n">listing</span><span class="p">)</span>
-                <span class="n">path</span> <span class="o">=</span> <span class="n">listing</span><span class="p">[</span><span class="mf">0</span><span class="p">][</span><span class="nb">len</span><span class="p">(</span><span class="n">language</span><span class="o">.</span><span class="n">commentTag</span><span class="p">):]</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
-                <span class="k">if</span> <span class="n">path</span> <span class="ow">in</span> <span class="n">paths</span><span class="p">:</span>
-                    <span class="k">print</span><span class="p">(</span><span class="s">&quot;ERROR: Duplicate file name: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">path</span><span class="p">)</span>
-                    <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span>
-                <span class="k">else</span><span class="p">:</span>
-                    <span class="n">paths</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
-                <span class="n">path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s">&quot;..&quot;</span><span class="p">,</span> <span class="s">&quot;code&quot;</span><span class="p">,</span> <span class="n">path</span><span class="p">)</span>
-                <span class="n">dirname</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
-                <span class="k">if</span> <span class="n">dirname</span><span class="p">:</span>
-                    <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">dirname</span><span class="p">):</span>
-                        <span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">dirname</span><span class="p">)</span>
-                <span class="nb">file</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="s">&#39;w&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">listing</span><span class="p">))</span>
+        <span class="k">for</span> <span class="n">listing</span> <span class="ow">in</span> <span class="p">[</span><span class="n">shift</span><span class="p">(</span><span class="n">listing</span><span class="p">)</span> <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">restFiles</span>
+                    <span class="k">for</span> <span class="n">listing</span> <span class="ow">in</span> <span class="n">language</span><span class="o">.</span><span class="n">listings</span><span class="o">.</span><span class="n">findall</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="n">f</span><span class="p">)</span><span class="o">.</span><span class="n">read</span><span class="p">())]:</span>
+            <span class="n">path</span> <span class="o">=</span> <span class="n">listing</span><span class="p">[</span><span class="mf">0</span><span class="p">][</span><span class="nb">len</span><span class="p">(</span><span class="n">language</span><span class="o">.</span><span class="n">commentTag</span><span class="p">):]</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
+            <span class="k">if</span> <span class="n">path</span> <span class="ow">in</span> <span class="n">paths</span><span class="p">:</span>
+                <span class="k">print</span><span class="p">(</span><span class="s">&quot;ERROR: Duplicate file name: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">path</span><span class="p">)</span>
+                <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span>
+            <span class="k">else</span><span class="p">:</span>
+                <span class="n">paths</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
+            <span class="n">path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s">&quot;..&quot;</span><span class="p">,</span> <span class="s">&quot;code&quot;</span><span class="p">,</span> <span class="n">path</span><span class="p">)</span>
+            <span class="n">dirname</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
+            <span class="k">if</span> <span class="n">dirname</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">dirname</span><span class="p">):</span>
+                <span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">dirname</span><span class="p">)</span>
+            <span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">path</span><span class="p">)</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">force</span><span class="p">:</span>
+                <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">difflib</span><span class="o">.</span><span class="n">ndiff</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="n">path</span><span class="p">)</span><span class="o">.</span><span class="n">read</span><span class="p">()</span><span class="o">.</span><span class="n">splitlines</span><span class="p">(),</span> <span class="n">listing</span><span class="p">):</span>
+                    <span class="k">if</span> <span class="n">i</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&quot;+ &quot;</span><span class="p">)</span> <span class="ow">or</span> <span class="n">i</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&quot;- &quot;</span><span class="p">):</span>
+                        <span class="k">print</span><span class="p">(</span><span class="s">&quot;ERROR: Existing file different from .rst&quot;</span><span class="p">)</span>
+                        <span class="k">print</span><span class="p">(</span><span class="s">&quot;Use &#39;extract -force&#39; to force overwrite&quot;</span><span class="p">)</span>
+                        <span class="n">Commands</span><span class="o">.</span><span class="n">check</span><span class="p">(</span><span class="n">language</span><span class="p">)</span>
+                        <span class="k">return</span>
+            <span class="nb">file</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="s">&#39;w&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">listing</span><span class="p">))</span>
 
     <span class="nd">@staticmethod</span>
     <span class="k">def</span> <span class="nf">check</span><span class="p">(</span><span class="n">language</span><span class="p">):</span>
 <span class="sd">        have changed from what&#39;s in the .rst files. Generate files in the</span>
 <span class="sd">        _deltas subdirectory showing what has changed.</span>
 <span class="sd">        &quot;&quot;&quot;</span>
-        <span class="n">missing</span> <span class="o">=</span> <span class="p">[]</span>
-        <span class="n">listings</span> <span class="o">=</span> <span class="p">[</span><span class="n">shift</span><span class="p">(</span><span class="n">code</span><span class="p">)</span> <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">restFiles</span> <span class="k">for</span> <span class="n">code</span> <span class="ow">in</span>
+        <span class="k">class</span> <span class="nc">Result</span><span class="p">:</span> <span class="c"># Messenger</span>
+            <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">__dict__</span> <span class="o">=</span> <span class="n">kwargs</span>
+        <span class="n">result</span> <span class="o">=</span> <span class="n">Result</span><span class="p">(</span><span class="n">missing</span> <span class="o">=</span> <span class="p">[],</span> <span class="n">deltas</span> <span class="o">=</span> <span class="p">[])</span>
+        <span class="n">listings</span> <span class="o">=</span> <span class="p">[</span><span class="n">Result</span><span class="p">(</span><span class="n">code</span> <span class="o">=</span> <span class="n">shift</span><span class="p">(</span><span class="n">code</span><span class="p">),</span> <span class="nb">file</span> <span class="o">=</span> <span class="n">f</span><span class="p">)</span>
+                    <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">restFiles</span> <span class="k">for</span> <span class="n">code</span> <span class="ow">in</span>
                     <span class="n">language</span><span class="o">.</span><span class="n">listings</span><span class="o">.</span><span class="n">findall</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="n">f</span><span class="p">)</span><span class="o">.</span><span class="n">read</span><span class="p">())]</span>
         <span class="n">paths</span> <span class="o">=</span> <span class="p">[</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">normpath</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s">&quot;..&quot;</span><span class="p">,</span> <span class="s">&quot;code&quot;</span><span class="p">,</span> <span class="n">path</span><span class="p">))</span> <span class="k">for</span> <span class="n">path</span> <span class="ow">in</span>
-                    <span class="p">[</span><span class="n">listing</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">()[</span><span class="nb">len</span><span class="p">(</span><span class="n">language</span><span class="o">.</span><span class="n">commentTag</span><span class="p">):]</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
+                    <span class="p">[</span><span class="n">listing</span><span class="o">.</span><span class="n">code</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">()[</span><span class="nb">len</span><span class="p">(</span><span class="n">language</span><span class="o">.</span><span class="n">commentTag</span><span class="p">):]</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
                      <span class="k">for</span> <span class="n">listing</span> <span class="ow">in</span> <span class="n">listings</span><span class="p">]]</span>
+        <span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="s">&quot;_deltas&quot;</span><span class="p">):</span>
+            <span class="n">shutil</span><span class="o">.</span><span class="n">rmtree</span><span class="p">(</span><span class="s">&quot;_deltas&quot;</span><span class="p">)</span>
         <span class="k">for</span> <span class="n">path</span><span class="p">,</span> <span class="n">listing</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">paths</span><span class="p">,</span> <span class="n">listings</span><span class="p">):</span>
             <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">path</span><span class="p">):</span>
-                <span class="n">missing</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
+                <span class="n">result</span><span class="o">.</span><span class="n">missing</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
             <span class="k">else</span><span class="p">:</span>
                 <span class="n">code</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">path</span><span class="p">)</span><span class="o">.</span><span class="n">read</span><span class="p">()</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()</span>
-                <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">difflib</span><span class="o">.</span><span class="n">ndiff</span><span class="p">(</span><span class="n">listing</span><span class="p">,</span> <span class="n">code</span><span class="p">):</span>
+                <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">difflib</span><span class="o">.</span><span class="n">ndiff</span><span class="p">(</span><span class="n">listing</span><span class="o">.</span><span class="n">code</span><span class="p">,</span> <span class="n">code</span><span class="p">):</span>
                     <span class="k">if</span> <span class="n">i</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&quot;+ &quot;</span><span class="p">)</span> <span class="ow">or</span> <span class="n">i</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s">&quot;- &quot;</span><span class="p">):</span>
                         <span class="n">d</span> <span class="o">=</span> <span class="n">difflib</span><span class="o">.</span><span class="n">HtmlDiff</span><span class="p">()</span>
                         <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="s">&quot;_deltas&quot;</span><span class="p">):</span>
                             <span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="s">&quot;_deltas&quot;</span><span class="p">)</span>
                         <span class="n">html</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s">&quot;_deltas&quot;</span><span class="p">,</span>
                             <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">path</span><span class="p">)</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s">&#39;.&#39;</span><span class="p">)[</span><span class="mf">0</span><span class="p">]</span> <span class="o">+</span> <span class="s">&quot;.html&quot;</span><span class="p">)</span>
-                        <span class="nb">open</span><span class="p">(</span><span class="n">html</span><span class="p">,</span> <span class="s">&#39;w&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">d</span><span class="o">.</span><span class="n">make_file</span><span class="p">(</span><span class="n">listing</span><span class="p">,</span> <span class="n">code</span><span class="p">))</span>
-                        <span class="k">print</span><span class="p">(</span><span class="s">&quot;change in </span><span class="si">%s</span><span class="s">; see </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">html</span><span class="p">))</span>
+                        <span class="nb">open</span><span class="p">(</span><span class="n">html</span><span class="p">,</span> <span class="s">&#39;w&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">write</span><span class="p">(</span>
+                            <span class="s">&quot;&lt;html&gt;&lt;h1&gt;Left: </span><span class="si">%s</span><span class="s">&lt;br&gt;Right: </span><span class="si">%s</span><span class="s">&lt;/h1&gt;&quot;</span> <span class="o">%</span>
+                            <span class="p">(</span><span class="n">listing</span><span class="o">.</span><span class="n">file</span><span class="p">,</span> <span class="n">path</span><span class="p">)</span> <span class="o">+</span>
+                            <span class="n">d</span><span class="o">.</span><span class="n">make_file</span><span class="p">(</span><span class="n">listing</span><span class="o">.</span><span class="n">code</span><span class="p">,</span> <span class="n">code</span><span class="p">))</span>
+                        <span class="n">result</span><span class="o">.</span><span class="n">deltas</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">Result</span><span class="p">(</span><span class="nb">file</span> <span class="o">=</span> <span class="n">listing</span><span class="o">.</span><span class="n">file</span><span class="p">,</span>
+                            <span class="n">path</span> <span class="o">=</span> <span class="n">path</span><span class="p">,</span> <span class="n">html</span> <span class="o">=</span> <span class="n">html</span><span class="p">,</span> <span class="n">code</span> <span class="o">=</span> <span class="n">code</span><span class="p">))</span>
                         <span class="k">break</span>
-        <span class="k">if</span> <span class="n">missing</span><span class="p">:</span>
-            <span class="k">print</span><span class="p">(</span><span class="s">&quot;Missing&quot;</span><span class="p">,</span> <span class="n">language</span><span class="o">.</span><span class="n">__name__</span><span class="p">,</span> <span class="s">&quot;files:</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">,</span> <span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">missing</span><span class="p">))</span>
-        <span class="k">return</span> <span class="n">missing</span>
+        <span class="k">if</span> <span class="n">result</span><span class="o">.</span><span class="n">missing</span><span class="p">:</span>
+            <span class="k">print</span><span class="p">(</span><span class="s">&quot;Missing </span><span class="si">%s</span><span class="s"> files:</span><span class="se">\n</span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span>
+                  <span class="p">(</span><span class="n">language</span><span class="o">.</span><span class="n">__name__</span><span class="p">,</span> <span class="s">&quot;</span><span class="se">\n</span><span class="s">&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">result</span><span class="o">.</span><span class="n">missing</span><span class="p">)))</span>
+        <span class="k">for</span> <span class="n">delta</span> <span class="ow">in</span> <span class="n">result</span><span class="o">.</span><span class="n">deltas</span><span class="p">:</span>
+            <span class="k">print</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%s</span><span class="s"> changed in </span><span class="si">%s</span><span class="s">; see </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span>
+                  <span class="p">(</span><span class="n">delta</span><span class="o">.</span><span class="n">file</span><span class="p">,</span> <span class="n">delta</span><span class="o">.</span><span class="n">path</span><span class="p">,</span> <span class="n">delta</span><span class="o">.</span><span class="n">html</span><span class="p">))</span>
+        <span class="k">return</span> <span class="n">result</span>
 
     <span class="nd">@staticmethod</span>
     <span class="k">def</span> <span class="nf">update</span><span class="p">(</span><span class="n">language</span><span class="p">):</span> <span class="c"># Test until it is trustworthy</span>
         <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Refresh external code files into ReST files.</span>
+<span class="sd">        Refresh external code files into .rst files.</span>
 <span class="sd">        &quot;&quot;&quot;</span>
-        <span class="k">if</span> <span class="n">Commands</span><span class="o">.</span><span class="n">check</span><span class="p">(</span><span class="n">language</span><span class="p">):</span>
+        <span class="n">check_result</span> <span class="o">=</span> <span class="n">Commands</span><span class="o">.</span><span class="n">check</span><span class="p">(</span><span class="n">language</span><span class="p">)</span>
+        <span class="k">if</span> <span class="n">check_result</span><span class="o">.</span><span class="n">missing</span><span class="p">:</span>
             <span class="k">print</span><span class="p">(</span><span class="n">language</span><span class="o">.</span><span class="n">__name__</span><span class="p">,</span> <span class="s">&quot;update aborted&quot;</span><span class="p">)</span>
             <span class="k">return</span>
+        <span class="n">changed</span> <span class="o">=</span> <span class="bp">False</span>
         <span class="k">def</span> <span class="nf">_update</span><span class="p">(</span><span class="n">matchobj</span><span class="p">):</span>
             <span class="n">listing</span> <span class="o">=</span> <span class="n">shift</span><span class="p">(</span><span class="n">matchobj</span><span class="o">.</span><span class="n">group</span><span class="p">(</span><span class="mf">1</span><span class="p">))</span>
             <span class="n">path</span> <span class="o">=</span> <span class="n">listing</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">()[</span><span class="nb">len</span><span class="p">(</span><span class="n">language</span><span class="o">.</span><span class="n">commentTag</span><span class="p">):]</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span>
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="GeneratorsIterators.html" title="Generators, Iterators, and Itertools"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/Contributors.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Contributors &mdash; Python 3 Patterns & Idioms</title>
+    <title>Contributors &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="ToDo List" href="ToDo.html" />
-    <link rel="prev" title="Python 3 Patterns &amp; Idioms" href="index.html" />
+    <link rel="prev" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
   </head>
   <body>
     <div class="related">
           <a href="ToDo.html" title="ToDo List"
              accesskey="N">next</a> |</li>
         <li class="right" >
-          <a href="index.html" title="Python 3 Patterns &amp; Idioms"
+          <a href="index.html" title="Python 3 Patterns, Recipes and Idioms"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
 
 
             <h4>Previous topic</h4>
-            <p class="topless"><a href="index.html" title="previous chapter">Python 3 Patterns &amp; Idioms</a></p>
+            <p class="topless"><a href="index.html" title="previous chapter">Python 3 Patterns, Recipes and Idioms</a></p>
             <h4>Next topic</h4>
             <p class="topless"><a href="ToDo.html" title="next chapter">ToDo List</a></p>
             <h3>This Page</h3>
           <a href="ToDo.html" title="ToDo List"
              accesskey="N">next</a> |</li>
         <li class="right" >
-          <a href="index.html" title="Python 3 Patterns &amp; Idioms"
+          <a href="index.html" title="Python 3 Patterns, Recipes and Idioms"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/CoroutinesAndConcurrency.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Coroutines &amp; Concurrency &mdash; Python 3 Patterns & Idioms</title>
+    <title>Coroutines &amp; Concurrency &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Jython" href="Jython.html" />
     <link rel="prev" title="Comprehensions" href="Comprehensions.html" />
   </head>
         <li class="right" >
           <a href="Comprehensions.html" title="Comprehensions"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="Comprehensions.html" title="Comprehensions"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/Decorator.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Decorator: Dynamic Type Selection &mdash; Python 3 Patterns & Idioms</title>
+    <title>Decorator: Dynamic Type Selection &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Iterators: Decoupling Algorithms from Containers" href="Iterators.html" />
     <link rel="prev" title="StateMachine" href="StateMachine.html" />
   </head>
         <li class="right" >
           <a href="StateMachine.html" title="StateMachine"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
 <p>The key to using this method is to find the particular combination you want.
 So, once you&#8217;ve found the drink you would like, here is how you would use it, as
 shown in the <strong>CoffeeShop</strong> class in the following code:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># decorator/nodecorators/CoffeeShop.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Decorator/nodecorators/CoffeeShop.py</span>
 <span class="c"># Coffee example with no decorators</span>
 
 <span class="k">class</span> <span class="nc">Espresso</span><span class="p">:</span> <span class="k">pass</span>
 and can of course perform processing before or after the invocation.</p>
 <p>So if we added <strong>getTotalCost()</strong> and <strong>getDescription()</strong> methods to the
 <strong>DrinkComponent</strong> interface, an Espresso looks like this:</p>
-<div class="highlight-python"><pre># decorator/alldecorators/EspressoDecorator.py
+<div class="highlight-python"><pre># Decorator/alldecorators/EspressoDecorator.py
 
 class Espresso(Decorator):
     cost = 0.75f
 </div>
 <p>You combine the components to create a drink as follows, as shown in the code
 below:</p>
-<div class="highlight-python"><pre># decorator/alldecorators/CoffeeShop.py
+<div class="highlight-python"><pre># Decorator/alldecorators/CoffeeShop.py
 # Coffee example using decorators
 
 class DrinkComponent:
 are presented with in most coffee shops.</p>
 <img alt="_images/compromiseDecoration.gif" src="_images/compromiseDecoration.gif" />
 <p>Here is how to create a basic selection, as well as a decorated selection:</p>
-<div class="highlight-python"><pre># decorator/compromise/CoffeeShop.py
+<div class="highlight-python"><pre># Decorator/compromise/CoffeeShop.py
 # Coffee example with a compromise of basic
 # combinations and decorators
 
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="StateMachine.html" title="StateMachine"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/DeveloperGuide.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Developer Guide &mdash; Python 3 Patterns & Idioms</title>
+    <title>Developer Guide &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Part I: Foundations" href="Part1.html" />
     <link rel="prev" title="Book Development Rules" href="Rules.html" />
   </head>
         <li class="right" >
           <a href="Rules.html" title="Book Development Rules"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
 changed files - so you can comment individually.</li>
 </ol>
 </div>
+<div class="section" id="emacs-for-editing-restructured-text">
+<h2>Emacs for Editing Restructured Text<a class="headerlink" href="#emacs-for-editing-restructured-text" title="Permalink to this headline">¶</a></h2>
+<p>If you want an editing system with support for restructured text, one choice is
+the free text editor <em>emacs</em>, which has an add-on mode for restructured text.
+Emacs has a long and venerable history, and is an extremely powerful editor.
+Emacs also has versions that are customized for operating systems to make it
+much more familiar.</p>
+<p>Here&#8217;s a <a class="reference external" href="http://lowfatlinux.com/linux-editor-emacs.html">simple introduction to emacs</a>.</p>
+<p><strong>Mac OSX</strong>: <a class="reference external" href="http://aquamacs.org/">Aquamacs</a> looks and feels like a native
+Mac application.</p>
+<p><strong>Windows</strong>: You can download the latest windows installer <a class="reference external" href="http://ftp.gnu.org/pub/gnu/emacs/windows/">here (choose the
+highest numbered zip file with &#8220;bin&#8221; in the name)</a>.
+<a class="reference external" href="http://www.arunrocks.com/blog/archives/2008/02/20/5-indespensible-tips-for-emacs-on-windows/">This blog</a>
+gives useful tips to make emacs on Windows even friendlier (in particular, it
+puts emacs on the right-click menu and improves the startup settings).</p>
+<p><strong>Linux</strong>: It&#8217;s virtually guaranteed that you already have emacs preinstalled
+on your Linux distribution, which you can start from a command prompt. However,
+there may also be more &#8220;windowy&#8221; versions that you can install separately.</p>
+<div class="admonition-todo admonition " id="todo-7">
+<p class="first admonition-title">Todo</p>
+<p class="last">Someone who knows more about emacs for Linux please add more specific information the windowed version(s).</p>
+</div>
+<p>Finally, <a class="reference external" href="http://docutils.sourceforge.net/docs/user/emacs.html">here&#8217;s the documentation for installing and using the emacs
+restructured-text mode</a>.</p>
+</div>
 </div>
 
 
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
 <li><a class="reference external" href="#building-the-pdf">Building the PDF</a></li>
 <li><a class="reference external" href="#working-with-bitbucket-and-mercurial">Working with BitBucket and Mercurial</a></li>
 <li><a class="reference external" href="#a-simple-overview-of-editing-and-merging">A Simple Overview Of Editing and Merging</a></li>
+<li><a class="reference external" href="#emacs-for-editing-restructured-text">Emacs for Editing Restructured Text</a></li>
 </ul>
 </li>
 </ul>
         <li class="right" >
           <a href="Rules.html" title="Book Development Rules"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/Factory.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Factory: Encapsulating Object Creation &mdash; Python 3 Patterns & Idioms</title>
+    <title>Factory: Encapsulating Object Creation &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Function Objects" href="FunctionObjects.html" />
     <link rel="prev" title="Iterators: Decoupling Algorithms from Containers" href="Iterators.html" />
   </head>
         <li class="right" >
           <a href="Iterators.html" title="Iterators: Decoupling Algorithms from Containers"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
 <h2>Simple Factory Method<a class="headerlink" href="#simple-factory-method" title="Permalink to this headline">¶</a></h2>
 <p>As an example, let&#8217;s revisit the <strong>Shape</strong> system.</p>
 <p>One approach is to make the factory a <strong>static</strong> method of the base class:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># factory/shapefact1/ShapeFactory1.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Factory/shapefact1/ShapeFactory1.py</span>
 <span class="c"># A simple static factory method.</span>
 <span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">generators</span>
 <span class="kn">import</span> <span class="nn">random</span>
 <h3>Preventing direct creation<a class="headerlink" href="#preventing-direct-creation" title="Permalink to this headline">¶</a></h3>
 <p>To disallow direct access to the classes, you can nest the classes within the
 factory method, like this:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># factory/shapefact1/NestedShapeFactory.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Factory/shapefact1/NestedShapeFactory.py</span>
 <span class="kn">import</span> <span class="nn">random</span>
 
 <span class="k">class</span> <span class="nc">Shape</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
 example of this in the next section). Here is <strong>ShapeFactory1.py</strong> modified so
 the factory methods are in a separate class as virtual functions. Notice also
 that the specific <strong>Shape</strong> classes are dynamically loaded on demand:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># factory/shapefact2/ShapeFactory2.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Factory/shapefact2/ShapeFactory2.py</span>
 <span class="c"># Polymorphic factory methods.</span>
 <span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">generators</span>
 <span class="kn">import</span> <span class="nn">random</span>
 <p>As another example suppose you are creating a general-purpose gaming environment
 and you want to be able to support different types of games. Here&#8217;s how it might
 look using an abstract factory:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># factory/Games.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Factory/Games.py</span>
 <span class="c"># An example of the Abstract Factory pattern.</span>
 
 <span class="k">class</span> <span class="nc">Obstacle</span><span class="p">:</span>
 example) is unnecessary - it&#8217;s only required for languages that have static type
 checking. As long as the concrete Python classes follow the form of the required
 classes, we don&#8217;t need any base classes:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># factory/Games2.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Factory/Games2.py</span>
 <span class="c"># Simplified Abstract Factory.</span>
 
 <span class="k">class</span> <span class="nc">Kitty</span><span class="p">:</span>
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="Iterators.html" title="Iterators: Decoupling Algorithms from Containers"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/Fronting.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Fronting for an Implementation &mdash; Python 3 Patterns & Idioms</title>
+    <title>Fronting for an Implementation &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="StateMachine" href="StateMachine.html" />
     <link rel="prev" title="Building Application Frameworks" href="AppFrameworks.html" />
   </head>
         <li class="right" >
           <a href="AppFrameworks.html" title="Building Application Frameworks"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
 <div class="section" id="proxy">
 <h2>Proxy<a class="headerlink" href="#proxy" title="Permalink to this headline">¶</a></h2>
 <p>If we implement <em>Proxy</em> by following the above diagram, it looks like this:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># fronting/ProxyDemo.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Fronting/ProxyDemo.py</span>
 <span class="c"># Simple demonstration of the Proxy pattern.</span>
 
 <span class="k">class</span> <span class="nc">Implementation</span><span class="p">:</span>
 that <strong>Proxy</strong> needs to call.</p>
 <p>Of course, in Python we have a delegation mechanism built in, so it makes the
 <strong>Proxy</strong> even simpler to implement:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># fronting/ProxyDemo2.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Fronting/ProxyDemo2.py</span>
 <span class="c"># Simple demonstration of the Proxy pattern.</span>
 
 <span class="k">class</span> <span class="nc">Implementation2</span><span class="p">:</span>
 <h2>State<a class="headerlink" href="#state" title="Permalink to this headline">¶</a></h2>
 <p>The <em>State</em> pattern adds more implementations to <em>Proxy</em>, along with a way to
 switch from one implementation to another during the lifetime of the surrogate:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># fronting/StateDemo.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Fronting/StateDemo.py</span>
 <span class="c"># Simple demonstration of the State pattern.</span>
 
 <span class="k">class</span> <span class="nc">State_d</span><span class="p">:</span>
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="AppFrameworks.html" title="Building Application Frameworks"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/FunctionObjects.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Function Objects &mdash; Python 3 Patterns & Idioms</title>
+    <title>Function Objects &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Changing the Interface" href="ChangeInterface.html" />
     <link rel="prev" title="Factory: Encapsulating Object Creation" href="Factory.html" />
   </head>
         <li class="right" >
           <a href="Factory.html" title="Factory: Encapsulating Object Creation"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
 wrapping a method in an object, you can pass it to other methods or objects as a
 parameter, to tell them to perform this particular operation in the process of
 fulfilling your request:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># functionObjects/CommandPattern.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># FunctionObjects/CommandPattern.py</span>
 
 <span class="k">class</span> <span class="nc">Command</span><span class="p">:</span>
     <span class="k">def</span> <span class="nf">execute</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <span class="k">pass</span>
 <p><em>Strategy</em> also adds a &#8220;Context&#8221; which can be a surrogate class that controls
 the selection and use of the particular strategy object-just like <em>State</em>!
 Here&#8217;s what it looks like:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># functionObjects/StrategyPattern.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># FunctionObjects/StrategyPattern.py</span>
 
 <span class="c"># The strategy interface:</span>
 <span class="k">class</span> <span class="nc">FindMinima</span><span class="p">:</span>
 find a solution. <em>Chain of Responsibility</em> provides a way to do this by chaining
 the <em>Strategy</em> objects together and providing a mechanism for them to
 automatically recurse through each one in the chain:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># functionObjects/ChainOfResponsibility.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># FunctionObjects/ChainOfResponsibility.py</span>
 
 <span class="c"># Carry the information into the strategy:</span>
 <span class="k">class</span> <span class="nc">Messenger</span><span class="p">:</span> <span class="k">pass</span>
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="Factory.html" title="Factory: Encapsulating Object Creation"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/GeneratorsIterators.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Generators, Iterators, and Itertools &mdash; Python 3 Patterns & Idioms</title>
+    <title>Generators, Iterators, and Itertools &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Comprehensions" href="Comprehensions.html" />
     <link rel="prev" title="Decorators" href="PythonDecorators.html" />
   </head>
         <li class="right" >
           <a href="PythonDecorators.html" title="Decorators"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
             
   
   <div class="section" id="generators-iterators-and-itertools">
-<span id="index-7"></span><h1>Generators, Iterators, and Itertools<a class="headerlink" href="#generators-iterators-and-itertools" title="Permalink to this headline">¶</a></h1>
+<span id="index-8"></span><h1>Generators, Iterators, and Itertools<a class="headerlink" href="#generators-iterators-and-itertools" title="Permalink to this headline">¶</a></h1>
 </div>
 
 
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="PythonDecorators.html" title="Decorators"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/Introduction.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Introduction &mdash; Python 3 Patterns & Idioms</title>
+    <title>Introduction &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Teaching Support" href="TeachingSupport.html" />
     <link rel="prev" title="A Note To Readers" href="NoteToReaders.html" />
   </head>
         <li class="right" >
           <a href="NoteToReaders.html" title="A Note To Readers"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="NoteToReaders.html" title="A Note To Readers"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/Iterators.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Iterators: Decoupling Algorithms from Containers &mdash; Python 3 Patterns & Idioms</title>
+    <title>Iterators: Decoupling Algorithms from Containers &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Factory: Encapsulating Object Creation" href="Factory.html" />
     <link rel="prev" title="Decorator: Dynamic Type Selection" href="Decorator.html" />
   </head>
         <li class="right" >
           <a href="Decorator.html" title="Decorator: Dynamic Type Selection"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
 can be used in the same places (you may argue that this is actually a <em>Proxy</em>
 pattern, but it&#8217;s more likely <em>Decorator</em> because of its intent). Here is the
 code:</p>
-<div class="highlight-python"><pre># util/TypedIterator.py
+<div class="highlight-python"><pre># Util/TypedIterator.py
 
 class TypedIterator(Iterator):
     def __init__(self, it, type):
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="Decorator.html" title="Decorator: Dynamic Type Selection"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/Jython.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Jython &mdash; Python 3 Patterns & Idioms</title>
+    <title>Jython &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Part II: Idioms" href="Part2.html" />
     <link rel="prev" title="Coroutines &amp; Concurrency" href="CoroutinesAndConcurrency.html" />
   </head>
         <li class="right" >
           <a href="CoroutinesAndConcurrency.html" title="Coroutines &amp; Concurrency"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
 The constructor initializes these fields, and then adds the new <strong>Event</strong> object
 to a static list called <strong>events</strong> (defining it in the class, but outside of any
 methods, is what makes it static):</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># jython/GreenHouseLanguage.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Jython/GreenHouseLanguage.py</span>
 
 <span class="k">class</span> <span class="nc">Event</span><span class="p">:</span>
     <span class="n">events</span> <span class="o">=</span> <span class="p">[]</span> <span class="c"># static</span>
 let&#8217;s use Jython, inside of Java. This turns out to be remarkably simple: you
 import some Jython classes, create a <strong>PythonInterpreter</strong> object, and cause the
 Python files to be loaded:</p>
-<div class="highlight-java"><div class="highlight"><pre><span class="c">// jython/GreenHouseController.java</span>
+<div class="highlight-java"><div class="highlight"><pre><span class="c">// Jython/GreenHouseController.java</span>
 <span class="kn">package</span> <span class="n">jython</span><span class="o">;</span>
 <span class="kn">import</span> <span class="nn">org.python.util.PythonInterpreter</span><span class="o">;</span>
 <span class="kn">import</span> <span class="nn">org.python.core.*</span><span class="o">;</span>
 into our <strong>PythonInterpreter</strong> object, and so it now &#8220;holds&#8221; the greenhouse
 controller language. The <strong>Schedule.ghs</strong> file is the one created by the end
 user to control the greenhouse. Here&#8217;s an example:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># jython/Schedule.ghs</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Jython/Schedule.ghs</span>
 <span class="n">Bell</span><span class="p">(</span><span class="mf">7.00</span><span class="p">)</span>
 <span class="n">ThermostatDay</span><span class="p">(</span><span class="mf">6.00</span><span class="p">)</span>
 <span class="n">WaterOn</span><span class="p">(</span><span class="mf">3.30</span><span class="p">)</span>
 data types and performs conversions upon them.  The following example is a
 reasonably thorough exercise of the various <strong>set( )</strong> possibilities, along with
 comments that should give a fairly complete explanation:</p>
-<div class="highlight-java"><div class="highlight"><pre><span class="c">// jython/PythonInterpreterSetting.java</span>
+<div class="highlight-java"><div class="highlight"><pre><span class="c">// Jython/PythonInterpreterSetting.java</span>
 <span class="c">// Passing data from Java to python when using</span>
 <span class="c">// the PythonInterpreter object.</span>
 <span class="kn">package</span> <span class="n">jython</span><span class="o">;</span>
 <strong>static</strong> method of <strong>net.mindview.python.PyUtil</strong>. This also includes
 utilities to extract a Python array into a Java <strong>List</strong>, and a Python
 dictionary into a Java <strong>Map</strong>:</p>
-<div class="highlight-java"><div class="highlight"><pre><span class="c">// jython/PyUtil.java</span>
+<div class="highlight-java"><div class="highlight"><pre><span class="c">// Jython/PyUtil.java</span>
 <span class="c">// PythonInterpreter utilities</span>
 <span class="kn">package</span> <span class="n">net</span><span class="o">.</span><span class="na">mindview</span><span class="o">.</span><span class="na">python</span><span class="o">;</span>
 <span class="kn">import</span> <span class="nn">org.python.util.PythonInterpreter</span><span class="o">;</span>
 </pre></div>
 </div>
 <p>Here is the (black-box) unit testing code:</p>
-<div class="highlight-java"><div class="highlight"><pre><span class="c">// jython/Test.java</span>
+<div class="highlight-java"><div class="highlight"><pre><span class="c">// Jython/Test.java</span>
 <span class="kn">package</span> <span class="n">net</span><span class="o">.</span><span class="na">mindview</span><span class="o">.</span><span class="na">python</span><span class="o">;</span>
 <span class="kn">import</span> <span class="nn">org.python.util.PythonInterpreter</span><span class="o">;</span>
 <span class="kn">import</span> <span class="nn">java.util.*</span><span class="o">;</span>
 results as an array of strings. For example, you can do a wildcard expansion of
 file names using Python&#8217;s <strong>glob( )</strong>, as shown further down in the following
 code:</p>
-<div class="highlight-java"><div class="highlight"><pre><span class="c">// jython/PythonInterpreterGetting.java</span>
+<div class="highlight-java"><div class="highlight"><pre><span class="c">// Jython/PythonInterpreterGetting.java</span>
 <span class="c">// Getting data from the PythonInterpreter object.</span>
 <span class="kn">package</span> <span class="n">jython</span><span class="o">;</span>
 <span class="kn">import</span> <span class="nn">org.python.util.PythonInterpreter</span><span class="o">;</span>
 <h3>Multiple Interpreters<a class="headerlink" href="#multiple-interpreters" title="Permalink to this headline">¶</a></h3>
 <p>It&#8217;s also worth noting that you can have multiple <strong>PythonInterpreter</strong> objects
 in a program, and each one has its own name space:</p>
-<div class="highlight-java"><div class="highlight"><pre><span class="c">// jython/MultipleJythons.java</span>
+<div class="highlight-java"><div class="highlight"><pre><span class="c">// Jython/MultipleJythons.java</span>
 <span class="c">// You can run multiple interpreters, each</span>
 <span class="c">// with its own name space.</span>
 <span class="kn">package</span> <span class="n">jython</span><span class="o">;</span>
 from within Jython. Basically, a Java class looks like a Python class. This is
 true for standard Java library classes as well as classes that you create
 yourself, as you can see here:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># jython/JavaClassInPython.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Jython/JavaClassInPython.py</span>
 <span class="c"># run with: jython.bat JavaClassInPython.py</span>
 <span class="c"># Using Java classes within Jython</span>
 <span class="kn">from</span> <span class="nn">java.util</span> <span class="kn">import</span> <span class="n">Date</span><span class="p">,</span> <span class="n">HashSet</span><span class="p">,</span> <span class="n">HashMap</span>
 see each other&#8217;s public methods.</p>
 <p>Java packages translate into Python modules, and Python must import a module in
 order to be able to use the Java class. Here is the Java code for <strong>JavaClass</strong>:</p>
-<div class="highlight-java"><div class="highlight"><pre><span class="c">// jython/javaclass/JavaClass.java</span>
+<div class="highlight-java"><div class="highlight"><pre><span class="c">// Jython/javaclass/JavaClass.java</span>
 <span class="kn">package</span> <span class="n">jython</span><span class="o">.</span><span class="na">javaclass</span><span class="o">;</span>
 <span class="kn">import</span> <span class="nn">junit.framework.*</span><span class="o">;</span>
 <span class="kn">import</span> <span class="nn">java.util.*</span><span class="o">;</span>
 <em>Thinking in Java</em> (you presumably have already downloaded and installed the
 source code for that book from <a class="reference external" href="http://www.MindviewInc.com">www.MindviewInc.com</a>, since a number of examples in this book use
 libraries from that book). Here is its conversion to Jython:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># jython/PythonSwing.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Jython/PythonSwing.py</span>
 <span class="c"># The HTMLButton.java example from</span>
 <span class="c"># &quot;Thinking in Java, 2nd edition,&quot; Chapter 13,</span>
 <span class="c"># converted into Jython.</span>
 <p>You can easily inherit from standard Java library classes in Jython. Here&#8217;s the
 <strong>Dialogs.java</strong> example from Chapter 13 of <em>Thinking in Java</em>, converted into
 Jython:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># jython/PythonDialogs.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Jython/PythonDialogs.py</span>
 <span class="c"># Dialogs.java from &quot;Thinking in Java, 2nd</span>
 <span class="c"># edition,&quot; Chapter 13, converted into Jython.</span>
 <span class="c"># Don&#39;t run this as part of the automatic make:</span>
 the desired makefile target. To accomplish this, the default makefile command is
 replaced using the &#8216;<strong>=M</strong>&#8216; directive (notice how you can break across lines
 using &#8216;<strong>\</strong>&#8216;):</p>
-<div class="highlight-python"><pre># jython/PythonToJavaClass.py
+<div class="highlight-python"><pre># Jython/PythonToJavaClass.py
 #=T python\java\test\PythonToJavaClass.class
 #=M jythonc.bat --package python.java.test \
 #=M PythonToJavaClass.py
 builder tool, which specifies a dependency in addition to those detected by the
 tool. Here, you can&#8217;t compile <strong>TestPythonToJavaClass.java</strong> until
 <strong>PythonToJavaClass.class</strong> is available:</p>
-<div class="highlight-java"><div class="highlight"><pre><span class="c">// jython/TestPythonToJavaClass.java</span>
+<div class="highlight-java"><div class="highlight"><pre><span class="c">// Jython/TestPythonToJavaClass.java</span>
 <span class="c">//+D python\java\test\PythonToJavaClass.class</span>
 <span class="kn">package</span> <span class="n">jython</span><span class="o">;</span>
 <span class="kn">import</span> <span class="nn">java.lang.reflect.*</span><span class="o">;</span>
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="CoroutinesAndConcurrency.html" title="Coroutines &amp; Concurrency"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/LanguageChanges.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Python 3 Language Changes &mdash; Python 3 Patterns & Idioms</title>
+    <title>Python 3 Language Changes &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Decorators" href="PythonDecorators.html" />
     <link rel="prev" title="Unit Testing &amp; Test-Driven Development" href="UnitTesting.html" />
   </head>
         <li class="right" >
           <a href="UnitTesting.html" title="Unit Testing &amp; Test-Driven Development"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
             
   
   <div class="section" id="python-3-language-changes">
-<span id="index-8"></span><h1>Python 3 Language Changes<a class="headerlink" href="#python-3-language-changes" title="Permalink to this headline">¶</a></h1>
+<span id="index-9"></span><h1>Python 3 Language Changes<a class="headerlink" href="#python-3-language-changes" title="Permalink to this headline">¶</a></h1>
 <p>Covers language features that don&#8217;t require their own chapters.</p>
 <div class="admonition note">
 <p class="first admonition-title">Note</p>
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="UnitTesting.html" title="Unit Testing &amp; Test-Driven Development"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/MachineDiscovery.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Discovering the Details About Your Platform &mdash; Python 3 Patterns & Idioms</title>
+    <title>Discovering the Details About Your Platform &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="A Canonical Form for Command-Line Programs" href="CanonicalScript.html" />
     <link rel="prev" title="Part II: Idioms" href="Part2.html" />
   </head>
         <li class="right" >
           <a href="Part2.html" title="Part II: Idioms"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
 but it falls short. Here&#8217;s a rather messy, but useful way to figure out
 everything else.</p>
 <p>Just a starting point:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">detectCPUs</span><span class="p">():</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># MachineDiscovery/detect_CPUs.py</span>
+<span class="k">def</span> <span class="nf">detect_CPUs</span><span class="p">():</span>
     <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">    Detects the number of CPUs on a system. Cribbed from pp.</span>
 <span class="sd">    &quot;&quot;&quot;</span>
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="Part2.html" title="Part II: Idioms"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/Messenger.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Messenger/Data Transfer Object &mdash; Python 3 Patterns & Idioms</title>
+    <title>Messenger/Data Transfer Object &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Part III: Patterns" href="Part3.html" />
     <link rel="prev" title="A Canonical Form for Command-Line Programs" href="CanonicalScript.html" />
   </head>
         <li class="right" >
           <a href="CanonicalScript.html" title="A Canonical Form for Command-Line Programs"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
             
   
   <div class="section" id="messenger-data-transfer-object">
-<span id="index-9"></span><h1>Messenger/Data Transfer Object<a class="headerlink" href="#messenger-data-transfer-object" title="Permalink to this headline">¶</a></h1>
+<span id="index-10"></span><h1>Messenger/Data Transfer Object<a class="headerlink" href="#messenger-data-transfer-object" title="Permalink to this headline">¶</a></h1>
 <p>The <em>Messenger</em> or <em>Data Transfer Object</em> is a way to pass a clump of
 information around. The most typical place for this is in return values from
 functions, where tuples or dictionaries are often used. However, those rely on
 syntax which can be slightly less desireable.</p>
 <p>A Messenger is simply an object with attributes corresponding to the names of
 the data you want to pass around or return:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># messenger/MessengerIdiom.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Messenger/MessengerIdiom.py</span>
 
 <span class="k">class</span> <span class="nc">Messenger</span><span class="p">:</span>
     <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="CanonicalScript.html" title="A Canonical Form for Command-Line Programs"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/MultipleDispatching.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Multiple Dispatching &mdash; Python 3 Patterns & Idioms</title>
+    <title>Multiple Dispatching &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Visitor" href="Visitor.html" />
     <link rel="prev" title="Observer" href="Observer.html" />
   </head>
         <li class="right" >
           <a href="Observer.html" title="Observer"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
 working with two different type hierarchies that are interacting, then you&#8217;ll
 have to have a polymorphic method call in each hierarchy.</p>
 <p>Here&#8217;s an example of multiple dispatching:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># multipleDispatching/PaperScissorsRock.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># MultipleDispatching/PaperScissorsRock.py</span>
 <span class="c"># Demonstration of multiple dispatching.</span>
 <span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">generators</span>
 <span class="kn">import</span> <span class="nn">random</span>
 easy to maintain if you ever expect to modify the behavior or to add a new
 <strong>Item</strong> class. Instead, it can be more sensible to make the table explicit,
 like this:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># multipleDispatching/PaperScissorsRock2.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># MultipleDispatching/PaperScissorsRock2.py</span>
 <span class="c"># Multiple dispatching using a table</span>
 <span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">generators</span>
 <span class="kn">import</span> <span class="nn">random</span>
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="Observer.html" title="Observer"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/NoteToReaders.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>A Note To Readers &mdash; Python 3 Patterns & Idioms</title>
+    <title>A Note To Readers &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Introduction" href="Introduction.html" />
     <link rel="prev" title="ToDo List" href="ToDo.html" />
   </head>
         <li class="right" >
           <a href="ToDo.html" title="ToDo List"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="ToDo.html" title="ToDo List"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/Observer.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Observer &mdash; Python 3 Patterns & Idioms</title>
+    <title>Observer &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Multiple Dispatching" href="MultipleDispatching.html" />
     <link rel="prev" title="Table-Driven Code: Configuration Flexibility" href="TableDriven.html" />
   </head>
         <li class="right" >
           <a href="TableDriven.html" title="Table-Driven Code: Configuration Flexibility"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li>
       </ul>
     </div>
     <div class="document">
 a <strong>synchronized</strong> keyword that provides built-in support for thread
 synchronization. We could certainly accomplish the same thing by hand, using
 code like this:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># util/ToSynch.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Util/ToSynch.py</span>
 
 <span class="kn">import</span> <span class="nn">threading</span>
 <span class="k">class</span> <span class="nc">ToSynch</span><span class="p">:</span>
 </div>
 <p>But this rapidly becomes tedious to write and to read. Peter Norvig provided me
 with a much nicer solution:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># util/Synchronization.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Util/Synchronization.py</span>
 <span class="sd">&#39;&#39;&#39;Simple emulation of Java&#39;s &#39;synchronized&#39;</span>
 <span class="sd">keyword, from Peter Norvig.&#39;&#39;&#39;</span>
 <span class="kn">import</span> <span class="nn">threading</span>
 class author, but it&#8217;s more consistent to use inheritance, so the base class
 <strong>Synchronization</strong> is provided.</p>
 <p>Here&#8217;s a simple test of the <strong>Synchronization</strong> module:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># util/TestSynchronization.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Util/TestSynchronization.py</span>
 <span class="kn">from</span> <span class="nn">Synchronization</span> <span class="kn">import</span> <span class="o">*</span>
 
 <span class="c"># To use for a method:</span>
 <strong>g</strong>. Note that since <strong>m</strong> ends up being synchronized twice, it will be
 entered and left twice for every call, which isn&#8217;t very desirable [there may be
 a fix for this]:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># util/Observer.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Util/Observer.py</span>
 <span class="c"># Class support for &quot;observer&quot; pattern.</span>
 <span class="kn">from</span> <span class="nn">Synchronization</span> <span class="kn">import</span> <span class="o">*</span>
 
 </pre></div>
 </div>
 <p>Using this library, here is an example of the observer pattern:</p>
-<div class="highlight-python"><pre># observer/ObservedFlower.py
+<div class="highlight-python"><pre># Observer/ObservedFlower.py
 # Demonstration of "observer" pattern.
 import sys
 sys.path += ['../util']
 one that was clicked, and if so it changes its color to match the clicked box.
 (NOTE: this example has not been converted. See further down for a version that
 has the GUI but not the Observers, in PythonCard.):</p>
-<div class="highlight-python"><pre># observer/BoxObserver.py
+<div class="highlight-python"><pre># Observer/BoxObserver.py
 # Demonstration of Observer pattern using
 # Java's built-in observer classes.
 
 <p>Here is a version of the above that doesn&#8217;t use the Observer pattern, written by
 Kevin Altis using PythonCard, and placed here as a starting point for a
 translation that does include Observer:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># observer/BoxObserverPythonCard.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Observer/BoxObserverPythonCard.py</span>
 <span class="sd">&quot;&quot;&quot; Written by Kevin Altis as a first-cut for</span>
 <span class="sd">converting BoxObserver to Python. The Observer</span>
 <span class="sd">hasn&#39;t been integrated yet.</span>
 </pre></div>
 </div>
 <p>This is the resource file for running the program (see PythonCard for details):</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="c"># observer/BoxObserver.rsrc.py</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># Observer/BoxObserver.rsrc.py</span>
 <span class="p">{</span><span class="s">&#39;stack&#39;</span><span class="p">:{</span><span class="s">&#39;type&#39;</span><span class="p">:</span><span class="s">&#39;Stack&#39;</span><span class="p">,</span>
           <span class="s">&#39;name&#39;</span><span class="p">:</span><span class="s">&#39;BoxObserver&#39;</span><span class="p">,</span>
     <span class="s">&#39;backgrounds&#39;</span><span class="p">:</span> <span class="p">[</span>
       <div class="sphinxsidebar">
         <div class="sphinxsidebarwrapper">
             <p class="logo"><a href="index.html">
-              <img class="logo" src="_static/Logo.png" alt="Logo"/>
+              <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>
     
         <li class="right" >
           <a href="TableDriven.html" title="Table-Driven Code: Configuration Flexibility"
              accesskey="P">previous</a> |</li>
-        <li><a href="index.html">Python 3 Patterns & Idioms</a> &raquo;</li>
+        <li><a href="index.html">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 Nov 12, 2008.
+      Last updated on Nov 27, 2008.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
     </div>
   </body>

File html/Part1.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Part I: Foundations &mdash; Python 3 Patterns & Idioms</title>
+    <title>Part I: Foundations &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">
     <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 & Idioms" href="index.html" />
+    <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Quick Python for Programmers" href="QuickPython.html" />
     <link rel="prev" title="Developer Guide" href="DeveloperGuide.html" />
   </head>
         <li class="right" >