Mathieu D. avatar Mathieu D. committed 59754c8

replace backticks with repr() in Singleton.rst + rebuild

Comments (0)

Files changed (49)

docs/Singleton.rst

             def __init__(self, arg):
                 self.val = arg
             def __str__(self):
-                return `self` + self.val
+                return repr(self) + self.val
         instance = None
         def __init__(self, arg):
             if not OnlyOne.instance:

html/AppFrameworks.html

+
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
     <title>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">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
         VERSION:     '1.0',
-        COLLAPSE_MODINDEX: false,
+        COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
       };
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <link rel="shortcut icon" href="_static/favicon.ico"/>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
     <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Fronting for an Implementation" href="Fronting.html" />
     <link rel="prev" title="The Singleton" href="Singleton.html" /> 
         <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li> 
       </ul>
     </div>  
+
     <div class="document">
       <div class="documentwrapper">
         <div class="bodywrapper">
     <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="bp">self</span><span class="o">.</span><span class="n">__templateMethod</span><span class="p">()</span>
     <span class="k">def</span> <span class="nf">__templateMethod</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
-        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mf">5</span><span class="p">):</span>
+        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">5</span><span class="p">):</span>
             <span class="bp">self</span><span class="o">.</span><span class="n">customize1</span><span class="p">()</span>
             <span class="bp">self</span><span class="o">.</span><span class="n">customize2</span><span class="p">()</span>
 
 write the output to the last file. Inherit to customize this framework to
 create two separate applications:</p>
 <blockquote>
-<ol class="arabic simple">
+<div><ol class="arabic simple">
 <li>Converts all the letters in each file to uppercase.</li>
 <li>Searches the files for words given in the first file.</li>
 </ol>
-</blockquote>
+</div></blockquote>
 </li>
 </ol>
 </div>
             </a></p>
     <font color="Red">This book is in early development; you will find parts that are incorrect &amp; incomplete.</font>
     
-            <h3><a href="index.html">Table Of Contents</a></h3>
-            <ul>
-<li><a class="reference external" href="">Building Application Frameworks</a><ul>
-<li><a class="reference external" href="#template-method">Template Method</a></li>
-<li><a class="reference external" href="#exercises">Exercises</a></li>
+  <h3><a href="index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Building Application Frameworks</a><ul>
+<li><a class="reference internal" href="#template-method">Template Method</a></li>
+<li><a class="reference internal" href="#exercises">Exercises</a></li>
 </ul>
 </li>
 </ul>
 
 
-            <h4>Previous topic</h4>
-            <p class="topless"><a href="Singleton.html"
-                                  title="previous chapter">The Singleton</a></p>
-            <h4>Next topic</h4>
-            <p class="topless"><a href="Fronting.html"
-                                  title="next chapter">Fronting for an Implementation</a></p>
-            <h3>This Page</h3>
-            <ul class="this-page-menu">
-              <li><a href="_sources/AppFrameworks.txt"
-                     rel="nofollow">Show Source</a></li>
-            </ul>
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="Singleton.html"
+                        title="previous chapter">The Singleton</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="Fronting.html"
+                        title="next chapter">Fronting for an Implementation</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="_sources/AppFrameworks.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
     
-	  <div id="searchbox" style="display: none">
-            <h3>Quick search</h3>
-              <form class="search" action="search.html" method="get">
-                <input type="text" name="q" size="18" />
-                <input type="submit" value="Go" />
-                <input type="hidden" name="check_keywords" value="yes" />
-                <input type="hidden" name="area" value="default" />
-              </form>
-	      <p style="font-size: 90%">Enter search terms or a module, class or function name.</p>
-          </div>
-          <script type="text/javascript">$('#searchbox').show(0);</script>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
     <h4><a href="http://www.mindviewinc.com/Books/Python3Patterns/Index.php">Project Homepage</a></h4>
     <h4><a href="http://www.bitbucket.org/BruceEckel/python-3-patterns-idioms/issues/">Corrections/Suggestions</a></h4>
     <h4><a href="http://www.mindviewinc.com/Consulting/Index.php">Consulting &amp; Training</a></h4><br><br>
       <ul>
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
-             accesskey="I">index</a></li>
+             >index</a></li>
         <li class="right" >
           <a href="Fronting.html" title="Fronting for an Implementation"
-             accesskey="N">next</a> |</li>
+             >next</a> |</li>
         <li class="right" >
           <a href="Singleton.html" title="The Singleton"
-             accesskey="P">previous</a> |</li>
+             >previous</a> |</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 Apr 07, 2009.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.
+        &copy; Copyright 2008, Creative Commons Attribution-Share Alike 3.0.
+      Last updated on Jan 10, 2012.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
     </div>
   </body>
 </html>

html/CanonicalScript.html

     </div>
     <div class="footer">
         &copy; Copyright 2008, Creative Commons Attribution-Share Alike 3.0.
-      Last updated on Jan 08, 2012.
+      Last updated on Jan 10, 2012.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
     </div>
   </body>

html/ChangeInterface.html

+
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
     <title>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">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
         VERSION:     '1.0',
-        COLLAPSE_MODINDEX: false,
+        COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
       };
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <link rel="shortcut icon" href="_static/favicon.ico"/>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
     <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Table-Driven Code: Configuration Flexibility" href="TableDriven.html" />
     <link rel="prev" title="Function Objects" href="FunctionObjects.html" /> 
         <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li> 
       </ul>
     </div>  
+
     <div class="document">
       <div class="documentwrapper">
         <div class="bodywrapper">
 it is a surrogate for. However, if you have the two words together: &#8220;proxy
 adapter,&#8221; it is perhaps more reasonable.</p>
 </div>
-<div class="section" id="fa-ade">
-<h2>Façade<a class="headerlink" href="#fa-ade" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="facade">
+<h2>Façade<a class="headerlink" href="#facade" title="Permalink to this headline">¶</a></h2>
 <p>A general principle that I apply when I&#8217;m casting about trying to mold
 requirements into a first-cut object is &#8220;If something is ugly, hide it inside an
 object.&#8221; This is basically what <em>Façade</em> accomplishes. If you have a rather
 
 <span class="c"># The client programmer gets the objects</span>
 <span class="c"># by calling the static methods:</span>
-<span class="n">a</span> <span class="o">=</span> <span class="n">Facade</span><span class="o">.</span><span class="n">makeA</span><span class="p">(</span><span class="mf">1</span><span class="p">);</span>
-<span class="n">b</span> <span class="o">=</span> <span class="n">Facade</span><span class="o">.</span><span class="n">makeB</span><span class="p">(</span><span class="mf">1</span><span class="p">);</span>
+<span class="n">a</span> <span class="o">=</span> <span class="n">Facade</span><span class="o">.</span><span class="n">makeA</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+<span class="n">b</span> <span class="o">=</span> <span class="n">Facade</span><span class="o">.</span><span class="n">makeB</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
 <span class="n">c</span> <span class="o">=</span> <span class="n">Facade</span><span class="o">.</span><span class="n">makeC</span><span class="p">(</span><span class="mf">1.0</span><span class="p">);</span>
 </pre></div>
 </div>
             </a></p>
     <font color="Red">This book is in early development; you will find parts that are incorrect &amp; incomplete.</font>
     
-            <h3><a href="index.html">Table Of Contents</a></h3>
-            <ul>
-<li><a class="reference external" href="">Changing the Interface</a><ul>
-<li><a class="reference external" href="#adapter">Adapter</a></li>
-<li><a class="reference external" href="#fa-ade">Façade</a></li>
-<li><a class="reference external" href="#exercises">Exercises</a></li>
+  <h3><a href="index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Changing the Interface</a><ul>
+<li><a class="reference internal" href="#adapter">Adapter</a></li>
+<li><a class="reference internal" href="#facade">Façade</a></li>
+<li><a class="reference internal" href="#exercises">Exercises</a></li>
 </ul>
 </li>
 </ul>
 
 
-            <h4>Previous topic</h4>
-            <p class="topless"><a href="FunctionObjects.html"
-                                  title="previous chapter">Function Objects</a></p>
-            <h4>Next topic</h4>
-            <p class="topless"><a href="TableDriven.html"
-                                  title="next chapter">Table-Driven Code: Configuration Flexibility</a></p>
-            <h3>This Page</h3>
-            <ul class="this-page-menu">
-              <li><a href="_sources/ChangeInterface.txt"
-                     rel="nofollow">Show Source</a></li>
-            </ul>
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="FunctionObjects.html"
+                        title="previous chapter">Function Objects</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="TableDriven.html"
+                        title="next chapter">Table-Driven Code: Configuration Flexibility</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="_sources/ChangeInterface.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
     
-	  <div id="searchbox" style="display: none">
-            <h3>Quick search</h3>
-              <form class="search" action="search.html" method="get">
-                <input type="text" name="q" size="18" />
-                <input type="submit" value="Go" />
-                <input type="hidden" name="check_keywords" value="yes" />
-                <input type="hidden" name="area" value="default" />
-              </form>
-	      <p style="font-size: 90%">Enter search terms or a module, class or function name.</p>
-          </div>
-          <script type="text/javascript">$('#searchbox').show(0);</script>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
     <h4><a href="http://www.mindviewinc.com/Books/Python3Patterns/Index.php">Project Homepage</a></h4>
     <h4><a href="http://www.bitbucket.org/BruceEckel/python-3-patterns-idioms/issues/">Corrections/Suggestions</a></h4>
     <h4><a href="http://www.mindviewinc.com/Consulting/Index.php">Consulting &amp; Training</a></h4><br><br>
       <ul>
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
-             accesskey="I">index</a></li>
+             >index</a></li>
         <li class="right" >
           <a href="TableDriven.html" title="Table-Driven Code: Configuration Flexibility"
-             accesskey="N">next</a> |</li>
+             >next</a> |</li>
         <li class="right" >
           <a href="FunctionObjects.html" title="Function Objects"
-             accesskey="P">previous</a> |</li>
+             >previous</a> |</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 Apr 07, 2009.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.
+        &copy; Copyright 2008, Creative Commons Attribution-Share Alike 3.0.
+      Last updated on Jan 10, 2012.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
     </div>
   </body>
 </html>

html/Comprehensions.html

     </div>
     <div class="footer">
         &copy; Copyright 2008, Creative Commons Attribution-Share Alike 3.0.
-      Last updated on Jan 08, 2012.
+      Last updated on Jan 10, 2012.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
     </div>
   </body>

html/Contributors.html

+
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
     <title>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">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
         VERSION:     '1.0',
-        COLLAPSE_MODINDEX: false,
+        COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
       };
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <link rel="shortcut icon" href="_static/favicon.ico"/>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
     <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="ToDo List" href="ToDo.html" />
     <link rel="prev" title="Python 3 Patterns, Recipes and Idioms" href="index.html" /> 
         <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li> 
       </ul>
     </div>  
+
     <div class="document">
       <div class="documentwrapper">
         <div class="bodywrapper">
 <div class="section" id="thanks-to">
 <h2>Thanks To<a class="headerlink" href="#thanks-to" title="Permalink to this headline">¶</a></h2>
 <blockquote>
-<ul class="simple">
+<div><ul class="simple">
 <li>BitBucket.org and the creators of Mercurial</li>
 <li>Creator(s) of Sphinx</li>
 <li>And of course, Guido and the team for their incessant improvement of Python,
 especially for taking the risk in breaking backward compatibility in Python
 3.0 to refactor the language.</li>
 </ul>
-</blockquote>
+</div></blockquote>
 <hr class="docutils" />
-<div class="admonition-todo admonition " id="todo-2">
+<div class="admonition-todo admonition" id="index-0">
 <p class="first admonition-title">Todo</p>
 <p>Yarko (example label of ToDo):</p>
 <ul class="last simple">
             </a></p>
     <font color="Red">This book is in early development; you will find parts that are incorrect &amp; incomplete.</font>
     
-            <h3><a href="index.html">Table Of Contents</a></h3>
-            <ul>
-<li><a class="reference external" href="">Contributors</a><ul>
-<li><a class="reference external" href="#thanks-to">Thanks To</a></li>
+  <h3><a href="index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Contributors</a><ul>
+<li><a class="reference internal" href="#thanks-to">Thanks To</a></li>
 </ul>
 </li>
 </ul>
 
 
-            <h4>Previous topic</h4>
-            <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>
-            <ul class="this-page-menu">
-              <li><a href="_sources/Contributors.txt"
-                     rel="nofollow">Show Source</a></li>
-            </ul>
+  <h4>Previous topic</h4>
+  <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>
+  <ul class="this-page-menu">
+    <li><a href="_sources/Contributors.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
     
-	  <div id="searchbox" style="display: none">
-            <h3>Quick search</h3>
-              <form class="search" action="search.html" method="get">
-                <input type="text" name="q" size="18" />
-                <input type="submit" value="Go" />
-                <input type="hidden" name="check_keywords" value="yes" />
-                <input type="hidden" name="area" value="default" />
-              </form>
-	      <p style="font-size: 90%">Enter search terms or a module, class or function name.</p>
-          </div>
-          <script type="text/javascript">$('#searchbox').show(0);</script>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
     <h4><a href="http://www.mindviewinc.com/Books/Python3Patterns/Index.php">Project Homepage</a></h4>
     <h4><a href="http://www.bitbucket.org/BruceEckel/python-3-patterns-idioms/issues/">Corrections/Suggestions</a></h4>
     <h4><a href="http://www.mindviewinc.com/Consulting/Index.php">Consulting &amp; Training</a></h4><br><br>
       <ul>
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
-             accesskey="I">index</a></li>
+             >index</a></li>
         <li class="right" >
           <a href="ToDo.html" title="ToDo List"
-             accesskey="N">next</a> |</li>
+             >next</a> |</li>
         <li class="right" >
           <a href="index.html" title="Python 3 Patterns, Recipes and Idioms"
-             accesskey="P">previous</a> |</li>
+             >previous</a> |</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 Apr 07, 2009.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.
+        &copy; Copyright 2008, Creative Commons Attribution-Share Alike 3.0.
+      Last updated on Jan 10, 2012.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
     </div>
   </body>
 </html>

html/CoroutinesAndConcurrency.html

+
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Coroutines, Concurrency & Distributed Systems &mdash; Python 3 Patterns, Recipes and Idioms</title>
+    <title>Coroutines, Concurrency &amp; Distributed Systems &mdash; Python 3 Patterns, Recipes and Idioms</title>
+    
     <link rel="stylesheet" href="_static/default.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
         VERSION:     '1.0',
-        COLLAPSE_MODINDEX: false,
+        COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
       };
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <link rel="shortcut icon" href="_static/favicon.ico"/>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
     <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
-    <link rel="next" title="Metaclasses" href="Metaclasses.html" />
+    <link rel="next" title="Jython" href="Jython.html" />
     <link rel="prev" title="Comprehensions" href="Comprehensions.html" /> 
   </head>
   <body>
           <a href="genindex.html" title="General Index"
              accesskey="I">index</a></li>
         <li class="right" >
-          <a href="Metaclasses.html" title="Metaclasses"
+          <a href="Jython.html" title="Jython"
              accesskey="N">next</a> |</li>
         <li class="right" >
           <a href="Comprehensions.html" title="Comprehensions"
         <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li> 
       </ul>
     </div>  
+
     <div class="document">
       <div class="documentwrapper">
         <div class="bodywrapper">
           <div class="body">
             
   <div class="section" id="coroutines-concurrency-distributed-systems">
-<span id="index-3"></span><h1>Coroutines, Concurrency &amp; Distributed Systems<a class="headerlink" href="#coroutines-concurrency-distributed-systems" title="Permalink to this headline">¶</a></h1>
+<span id="index-0"></span><h1>Coroutines, Concurrency &amp; Distributed Systems<a class="headerlink" href="#coroutines-concurrency-distributed-systems" title="Permalink to this headline">¶</a></h1>
+<p>[[ Will probably need to expand this to multiple chapters:</p>
+<ol class="arabic simple">
+<li>Concurrency Concepts</li>
+<li>Coroutines</li>
+<li>Processes</li>
+<li>Threads</li>
+</ol>
+<p>(this isn&#8217;t final; may need different organization or finer grained. However, it should start
+with simpler concepts and progress to the more difficult ones, as above.)</p>
+<p>]]</p>
 <p>Primary focus should be on:</p>
 <ol class="arabic simple">
 <li>Using <tt class="docutils literal"><span class="pre">yield</span></tt> to create coroutines</li>
 <li>Using the new <tt class="docutils literal"><span class="pre">multiprocessing</span></tt> module</li>
 </ol>
 <p>and then showing some alternative techniques.</p>
-<p>foo bar <tt class="xref docutils literal"><span class="pre">input()</span></tt> baz.</p>
+<p>foo bar <tt class="xref py py-func docutils literal"><span class="pre">input()</span></tt> baz.</p>
+<div class="section" id="the-gil">
+<h2>The GIL<a class="headerlink" href="#the-gil" title="Permalink to this headline">¶</a></h2>
+<p>The GIL prevents context switches from
+happening in the middle of C code. Basically, it makes any C
+code into a critical section, except when that C code explicitly releases
+the GIL. This greatly simplifies the task of writing extension
+modules as well the Python core.</p>
+<p>The designers of Python made a design decision
+that extension writers would not have to take care of locking.
+Thus, Python is intended to be simple/easy to integrate with any C
+library.  In order to remove the GIL, you&#8217;d have to go into all existing
+C code and write explicit locking/unlocking code, and you&#8217;d have to do this with
+every new C library as well.</p>
+<p>[[ Description of how it supports/impacts reference-counted garbage collection]]</p>
+</div>
 <div class="section" id="multiprocessing">
 <h2>Multiprocessing<a class="headerlink" href="#multiprocessing" title="Permalink to this headline">¶</a></h2>
 <p>Example by Michele Simionato in comp lang python.
 <span class="n">DISPLAY</span> <span class="o">=</span> <span class="p">[</span> <span class="s">&#39;|&#39;</span><span class="p">,</span> <span class="s">&#39;/&#39;</span><span class="p">,</span> <span class="s">&#39;-&#39;</span><span class="p">,</span> <span class="s">&#39;</span><span class="se">\\</span><span class="s">&#39;</span> <span class="p">]</span>
 <span class="k">def</span> <span class="nf">spinner_func</span><span class="p">(</span><span class="n">before</span><span class="o">=</span><span class="s">&#39;&#39;</span><span class="p">,</span> <span class="n">after</span><span class="o">=</span><span class="s">&#39;&#39;</span><span class="p">):</span>
     <span class="n">write</span><span class="p">,</span> <span class="n">flush</span> <span class="o">=</span> <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">write</span><span class="p">,</span> <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">flush</span>
-    <span class="n">pos</span> <span class="o">=</span> <span class="o">-</span><span class="mf">1</span>
+    <span class="n">pos</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span>
     <span class="k">while</span> <span class="bp">True</span><span class="p">:</span>
-        <span class="n">pos</span> <span class="o">=</span> <span class="p">(</span><span class="n">pos</span> <span class="o">+</span> <span class="mf">1</span><span class="p">)</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">DISPLAY</span><span class="p">)</span>
+        <span class="n">pos</span> <span class="o">=</span> <span class="p">(</span><span class="n">pos</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span> <span class="o">%</span> <span class="nb">len</span><span class="p">(</span><span class="n">DISPLAY</span><span class="p">)</span>
         <span class="n">msg</span> <span class="o">=</span> <span class="n">before</span> <span class="o">+</span> <span class="n">DISPLAY</span><span class="p">[</span><span class="n">pos</span><span class="p">]</span> <span class="o">+</span> <span class="n">after</span>
         <span class="n">write</span><span class="p">(</span><span class="n">msg</span><span class="p">);</span> <span class="n">flush</span><span class="p">()</span>
         <span class="n">write</span><span class="p">(</span><span class="s">&#39;</span><span class="se">\x08</span><span class="s">&#39;</span> <span class="o">*</span> <span class="nb">len</span><span class="p">(</span><span class="n">msg</span><span class="p">))</span>
         <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">DELAY</span><span class="p">)</span>
 <span class="k">def</span> <span class="nf">long_computation</span><span class="p">():</span>
     <span class="c"># emulate a long computation</span>
-    <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mf">3</span><span class="p">)</span>
+    <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
 <span class="k">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">&#39;__main__&#39;</span><span class="p">:</span>
     <span class="n">spinner</span> <span class="o">=</span> <span class="n">multiprocessing</span><span class="o">.</span><span class="n">Process</span><span class="p">(</span>
         <span class="bp">None</span><span class="p">,</span> <span class="n">spinner_func</span><span class="p">,</span> <span class="n">args</span><span class="o">=</span><span class="p">(</span><span class="s">&#39;Please wait ... &#39;</span><span class="p">,</span> <span class="s">&#39;&#39;</span><span class="p">))</span>
         <span class="n">spinner</span><span class="o">.</span><span class="n">terminate</span><span class="p">()</span>
 </pre></div>
 </div>
+<p>On the Erlang mail list, four years ago, Erlang expert Joe Armstrong posted this:</p>
+<blockquote>
+<div><p>In Concurrency Oriented (CO) programming you concentrate on the concurrency and the messages between the processes. There is no sharing of data.</p>
+<p>[A program] should be thought of thousands of little black boxes all doing things in parallel - these black boxes can send and receive messages. Black boxes can detect errors in other black boxes - that&#8217;s all.
+...
+Erlang uses a simple functional language inside the [black boxes] - this is not particularly interesting - <em>any</em> language that does the job would do - the important bit is the concurrency.</p>
+</div></blockquote>
+<p>On the Squeak mail list in 1998, Alan Kay had this to say:</p>
+<blockquote>
+<div><p>...Smalltalk is not only NOT its syntax or the class library, it is not even about classes. I&#8217;m sorry that I long ago coined the term &#8220;objects&#8221; for this topic because it gets many people to focus on the lesser idea.</p>
+<p>The big idea is &#8220;messaging&#8221; &#8211; that is what the kernal of Smalltalk/Squeak is all about... The key in making great and growable systems is much more to design how its modules communicate rather than what their internal properties and behaviors should be. Think of the internet &#8211; to live, it (a) has to allow many different kinds of ideas and realizations that are beyond any single standard and (b) to allow varying degrees of safe interoperability between these ideas.</p>
+<p>If you focus on just messaging &#8211; and realize that a good metasystem can late bind the various 2nd level architectures used in objects &#8211; then much of the language-, UI-, and OS based discussions on this thread are really quite moot.</p>
+</div></blockquote>
 </div>
 <div class="section" id="further-reading">
 <h2>Further Reading<a class="headerlink" href="#further-reading" title="Permalink to this headline">¶</a></h2>
 <blockquote>
-<p><a class="reference external" href="http://guidewiredevelopment.wordpress.com/2008/10/06/a-more-clearly-stated-version-of-my-argument/">This article</a>
+<div><p><a class="reference external" href="http://guidewiredevelopment.wordpress.com/2008/10/06/a-more-clearly-stated-version-of-my-argument/">This article</a>
 argues that large-scale parallelism &#8211; which is what
 <tt class="docutils literal"><span class="pre">multiprocessing</span></tt> supports &#8211; is the more important problem to solve, and
 that functional languages don&#8217;t help that much with this problem.</p>
 <p><a class="reference external" href="http://jessenoller.com/2009/02/01/python-threads-and-the-global-interpreter-lock/">http://jessenoller.com/2009/02/01/python-threads-and-the-global-interpreter-lock/</a></p>
-</blockquote>
+</div></blockquote>
 </div>
 </div>
 
             </a></p>
     <font color="Red">This book is in early development; you will find parts that are incorrect &amp; incomplete.</font>
     
-            <h3><a href="index.html">Table Of Contents</a></h3>
-            <ul>
-<li><a class="reference external" href="">Coroutines, Concurrency &amp; Distributed Systems</a><ul>
-<li><a class="reference external" href="#multiprocessing">Multiprocessing</a></li>
-<li><a class="reference external" href="#further-reading">Further Reading</a></li>
+  <h3><a href="index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Coroutines, Concurrency &amp; Distributed Systems</a><ul>
+<li><a class="reference internal" href="#the-gil">The GIL</a></li>
+<li><a class="reference internal" href="#multiprocessing">Multiprocessing</a></li>
+<li><a class="reference internal" href="#further-reading">Further Reading</a></li>
 </ul>
 </li>
 </ul>
 
 
-            <h4>Previous topic</h4>
-            <p class="topless"><a href="Comprehensions.html"
-                                  title="previous chapter">Comprehensions</a></p>
-            <h4>Next topic</h4>
-            <p class="topless"><a href="Metaclasses.html"
-                                  title="next chapter">Metaclasses</a></p>
-            <h3>This Page</h3>
-            <ul class="this-page-menu">
-              <li><a href="_sources/CoroutinesAndConcurrency.txt"
-                     rel="nofollow">Show Source</a></li>
-            </ul>
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="Comprehensions.html"
+                        title="previous chapter">Comprehensions</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="Jython.html"
+                        title="next chapter">Jython</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="_sources/CoroutinesAndConcurrency.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
     
-	  <div id="searchbox" style="display: none">
-            <h3>Quick search</h3>
-              <form class="search" action="search.html" method="get">
-                <input type="text" name="q" size="18" />
-                <input type="submit" value="Go" />
-                <input type="hidden" name="check_keywords" value="yes" />
-                <input type="hidden" name="area" value="default" />
-              </form>
-	      <p style="font-size: 90%">Enter search terms or a module, class or function name.</p>
-          </div>
-          <script type="text/javascript">$('#searchbox').show(0);</script>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
     <h4><a href="http://www.mindviewinc.com/Books/Python3Patterns/Index.php">Project Homepage</a></h4>
     <h4><a href="http://www.bitbucket.org/BruceEckel/python-3-patterns-idioms/issues/">Corrections/Suggestions</a></h4>
     <h4><a href="http://www.mindviewinc.com/Consulting/Index.php">Consulting &amp; Training</a></h4><br><br>
       <ul>
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
-             accesskey="I">index</a></li>
+             >index</a></li>
         <li class="right" >
-          <a href="Metaclasses.html" title="Metaclasses"
-             accesskey="N">next</a> |</li>
+          <a href="Jython.html" title="Jython"
+             >next</a> |</li>
         <li class="right" >
           <a href="Comprehensions.html" title="Comprehensions"
-             accesskey="P">previous</a> |</li>
+             >previous</a> |</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 Apr 07, 2009.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.
+        &copy; Copyright 2008, Creative Commons Attribution-Share Alike 3.0.
+      Last updated on Jan 10, 2012.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
     </div>
   </body>
 </html>

html/Decorator.html

+
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
     <title>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">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
         VERSION:     '1.0',
-        COLLAPSE_MODINDEX: false,
+        COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
       };
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <link rel="shortcut icon" href="_static/favicon.ico"/>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
     <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Iterators: Decoupling Algorithms from Containers" href="Iterators.html" />
     <link rel="prev" title="StateMachine" href="StateMachine.html" /> 
         <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li> 
       </ul>
     </div>  
+
     <div class="document">
       <div class="documentwrapper">
         <div class="bodywrapper">
 
 <span class="k">class</span> <span class="nc">Cappuccino</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="bp">self</span><span class="o">.</span><span class="n">cost</span> <span class="o">=</span> <span class="mf">1</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">cost</span> <span class="o">=</span> <span class="mi">1</span>
         <span class="bp">self</span><span class="o">.</span><span class="n">description</span> <span class="o">=</span> <span class="s">&quot;Cappucino&quot;</span>
     <span class="k">def</span> <span class="nf">getCost</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
         <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">cost</span>
             </a></p>
     <font color="Red">This book is in early development; you will find parts that are incorrect &amp; incomplete.</font>
     
-            <h3><a href="index.html">Table Of Contents</a></h3>
-            <ul>
-<li><a class="reference external" href="">Decorator: Dynamic Type Selection</a><ul>
-<li><a class="reference external" href="#basic-decorator-structure">Basic Decorator Structure</a></li>
-<li><a class="reference external" href="#a-coffee-example">A Coffee Example</a></li>
-<li><a class="reference external" href="#class-for-each-combination">Class for Each Combination</a></li>
-<li><a class="reference external" href="#the-decorator-approach">The Decorator Approach</a></li>
-<li><a class="reference external" href="#compromise">Compromise</a></li>
-<li><a class="reference external" href="#other-considerations">Other Considerations</a></li>
-<li><a class="reference external" href="#further-reading">Further Reading</a></li>
-<li><a class="reference external" href="#exercises">Exercises</a></li>
+  <h3><a href="index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Decorator: Dynamic Type Selection</a><ul>
+<li><a class="reference internal" href="#basic-decorator-structure">Basic Decorator Structure</a></li>
+<li><a class="reference internal" href="#a-coffee-example">A Coffee Example</a></li>
+<li><a class="reference internal" href="#class-for-each-combination">Class for Each Combination</a></li>
+<li><a class="reference internal" href="#the-decorator-approach">The Decorator Approach</a></li>
+<li><a class="reference internal" href="#compromise">Compromise</a></li>
+<li><a class="reference internal" href="#other-considerations">Other Considerations</a></li>
+<li><a class="reference internal" href="#further-reading">Further Reading</a></li>
+<li><a class="reference internal" href="#exercises">Exercises</a></li>
 </ul>
 </li>
 </ul>
 
 
-            <h4>Previous topic</h4>
-            <p class="topless"><a href="StateMachine.html"
-                                  title="previous chapter">StateMachine</a></p>
-            <h4>Next topic</h4>
-            <p class="topless"><a href="Iterators.html"
-                                  title="next chapter">Iterators: Decoupling Algorithms from Containers</a></p>
-            <h3>This Page</h3>
-            <ul class="this-page-menu">
-              <li><a href="_sources/Decorator.txt"
-                     rel="nofollow">Show Source</a></li>
-            </ul>
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="StateMachine.html"
+                        title="previous chapter">StateMachine</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="Iterators.html"
+                        title="next chapter">Iterators: Decoupling Algorithms from Containers</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="_sources/Decorator.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
     
-	  <div id="searchbox" style="display: none">
-            <h3>Quick search</h3>
-              <form class="search" action="search.html" method="get">
-                <input type="text" name="q" size="18" />
-                <input type="submit" value="Go" />
-                <input type="hidden" name="check_keywords" value="yes" />
-                <input type="hidden" name="area" value="default" />
-              </form>
-	      <p style="font-size: 90%">Enter search terms or a module, class or function name.</p>
-          </div>
-          <script type="text/javascript">$('#searchbox').show(0);</script>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
     <h4><a href="http://www.mindviewinc.com/Books/Python3Patterns/Index.php">Project Homepage</a></h4>
     <h4><a href="http://www.bitbucket.org/BruceEckel/python-3-patterns-idioms/issues/">Corrections/Suggestions</a></h4>
     <h4><a href="http://www.mindviewinc.com/Consulting/Index.php">Consulting &amp; Training</a></h4><br><br>
       <ul>
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
-             accesskey="I">index</a></li>
+             >index</a></li>
         <li class="right" >
           <a href="Iterators.html" title="Iterators: Decoupling Algorithms from Containers"
-             accesskey="N">next</a> |</li>
+             >next</a> |</li>
         <li class="right" >
           <a href="StateMachine.html" title="StateMachine"
-             accesskey="P">previous</a> |</li>
+             >previous</a> |</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 Apr 07, 2009.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.
+        &copy; Copyright 2008, Creative Commons Attribution-Share Alike 3.0.
+      Last updated on Jan 10, 2012.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
     </div>
   </body>
 </html>

html/DeveloperGuide.html

+
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
     <title>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">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
         VERSION:     '1.0',
-        COLLAPSE_MODINDEX: false,
+        COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
       };
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <link rel="shortcut icon" href="_static/favicon.ico"/>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
     <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Part I: Foundations" href="Part1.html" />
     <link rel="prev" title="Book Development Rules" href="Rules.html" /> 
         <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li> 
       </ul>
     </div>  
+
     <div class="document">
       <div class="documentwrapper">
         <div class="bodywrapper">
 <h2>For Windows Users<a class="headerlink" href="#for-windows-users" title="Permalink to this headline">¶</a></h2>
 <p>You need to install Cygwin; go to:</p>
 <blockquote>
-<a class="reference external" href="http://www.cygwin.com">http://www.cygwin.com</a></blockquote>
+<div><a class="reference external" href="http://www.cygwin.com">http://www.cygwin.com</a></div></blockquote>
 <p>You need to install at least the <tt class="docutils literal"><span class="pre">make</span></tt> utility, but I find that <tt class="docutils literal"><span class="pre">chere</span></tt>
 (command prompt here) is also very useful.</p>
 <p>Also install <tt class="docutils literal"><span class="pre">openssh</span></tt> (under <strong>Net</strong>), so you can create your RSA key
 <ol class="arabic">
 <li><p class="first">Get mercurial:</p>
 <blockquote>
-<p><a class="reference external" href="http://www.selenic.com/mercurial">http://www.selenic.com/mercurial</a></p>
+<div><p><a class="reference external" href="http://www.selenic.com/mercurial">http://www.selenic.com/mercurial</a></p>
 <p>Avoid installing the tortoiseHG part - it has caused trouble w/ Python
 debuggers.</p>
-</blockquote>
+</div></blockquote>
 </li>
 <li><p class="first">To get the Sphinx trunk, start with:</p>
 <blockquote>
-<p><tt class="docutils literal"><span class="pre">$</span> <span class="pre">hg</span> <span class="pre">clone</span> <span class="pre">http://www.bitbucket.org/birkenfeld/sphinx/</span></tt></p>
+<div><p><tt class="docutils literal"><span class="pre">$</span> <span class="pre">hg</span> <span class="pre">clone</span> <span class="pre">http://www.bitbucket.org/birkenfeld/sphinx/</span></tt></p>
 <p>and to update, use:</p>
 <p><tt class="docutils literal"><span class="pre">$</span> <span class="pre">hg</span> <span class="pre">pull</span></tt></p>
 <p>Once you update, run</p>
 <p>We may talk about minimum version numbers to process the book. Check your
 version with:</p>
 <p><tt class="docutils literal"><span class="pre">$</span> <span class="pre">hg</span> <span class="pre">identify</span> <span class="pre">-n</span></tt></p>
-</blockquote>
+</div></blockquote>
 </li>
 </ol>
 <p>The full anouncement from Georg (Sphinx creator) is here:</p>
 <blockquote>
-<a class="reference external" href="http://groups.google.com/group/sphinx-dev/browse_thread/thread/6dd415847e5cbf7c">http://groups.google.com/group/sphinx-dev/browse_thread/thread/6dd415847e5cbf7c</a></blockquote>
+<div><a class="reference external" href="http://groups.google.com/group/sphinx-dev/browse_thread/thread/6dd415847e5cbf7c">http://groups.google.com/group/sphinx-dev/browse_thread/thread/6dd415847e5cbf7c</a></div></blockquote>
 <p>Mercurial Cheat sheets &amp; quick starts should be enough to answer your questions:</p>
 <blockquote>
-<ul class="simple">
+<div><ul class="simple">
 <li><a class="reference external" href="http://edong.net/2008v1/docs/dongwoo-Hg-120dpi.png">http://edong.net/2008v1/docs/dongwoo-Hg-120dpi.png</a></li>
 <li><a class="reference external" href="http://www.ivy.fr/mercurial/ref/v1.0/">http://www.ivy.fr/mercurial/ref/v1.0/</a></li>
 </ul>
-</blockquote>
+</div></blockquote>
 </div>
 <div class="section" id="getting-the-development-branch-of-the-book">
 <h2>Getting the Development Branch of the Book<a class="headerlink" href="#getting-the-development-branch-of-the-book" title="Permalink to this headline">¶</a></h2>
 <p>To ensure you have Cygwin installed correctly (if you&#8217;re using windows) and
 to see what the options are, type:</p>
 <blockquote>
-<tt class="docutils literal"><span class="pre">make</span></tt></blockquote>
+<div><tt class="docutils literal"><span class="pre">make</span></tt></div></blockquote>
 <p>at a shell prompt. Then you can use <tt class="docutils literal"><span class="pre">make</span> <span class="pre">html</span></tt> to build the HTML version of
 the book, or <tt class="docutils literal"><span class="pre">make</span> <span class="pre">htmlhelp</span></tt> to make the windows help version, etc.</p>
 <p>You can also use the <tt class="docutils literal"><span class="pre">build</span></tt> system I&#8217;ve created (as a book example; it is
 part of the distribution). This will call <tt class="docutils literal"><span class="pre">make</span></tt> and it simplifies many of the
 tasks involved. Type:</p>
 <blockquote>
-<tt class="docutils literal"><span class="pre">build</span> <span class="pre">help</span></tt></blockquote>
+<div><tt class="docutils literal"><span class="pre">build</span> <span class="pre">help</span></tt></div></blockquote>
 <p>to see the options.</p>
-<div class="admonition-todo admonition " id="todo-4">
+<div class="admonition-todo admonition" id="index-0">
 <p class="first admonition-title">Todo</p>
 <p class="last">The remainder of this document needs rewriting. Rewrite this section
 for BitBucket &amp; Mercurial; make some project specific diagrams;</p>
 you do work, and keep it merged with the trunk.</p>
 <p>That is, you&#8217;ve done:</p>
 <blockquote>
-<ul class="simple">
+<div><ul class="simple">
 <li>Forked a branch of <a class="reference external" href="http://www.bitbucket.org/BruceEckel/python-3-patterns-idioms/">http://www.bitbucket.org/BruceEckel/python-3-patterns-idioms/</a>
 (the main trunk; this fork will provide a place for review and comment)</li>
 <li>cloned the trunk to your local machine:
 <li>cloned your local copy of trunk to create a working directory:
 - hg clone python-3-patterns-idioms devel</li>
 </ul>
-</blockquote>
-<div class="admonition-todo admonition " id="todo-5">
+</div></blockquote>
+<div class="admonition-todo admonition" id="index-1">
 <p class="first admonition-title">Todo</p>
 <p>This section still work in progress:</p>
 <ul class="last simple">
 <p>When you have a new function idea, or think you&#8217;ve found a bug, ask Bruce
 on the group.</p>
 <blockquote>
-<ul class="simple">
+<div><ul class="simple">
 <li>If you have a new feature, create a wiki page on BitBucket and
 describe what you&#8217;re going to do.</li>
 <li>If you have found a bug, make a bug report on BitBucket (later assign
 <li>If you want to work on a project, look for an unassigned bug and try to
 work it out - then proceed as below...</li>
 </ul>
-</blockquote>
+</div></blockquote>
 <p>When you are ready to share your work have others review, register a branch.</p>
 <div class="admonition note">
 <p class="first admonition-title">Note</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-6">
+<div class="admonition-todo admonition" id="index-2">
 <p class="first admonition-title">Todo</p>
 <p class="last">Someone who knows more about emacs for Linux please add more specific information about the windowed version(s).</p>
 </div>
             </a></p>
     <font color="Red">This book is in early development; you will find parts that are incorrect &amp; incomplete.</font>
     
-            <h3><a href="index.html">Table Of Contents</a></h3>
-            <ul>
-<li><a class="reference external" href="">Developer Guide</a><ul>
-<li><a class="reference external" href="#getting-started-the-easiest-approach">Getting Started: The Easiest Approach</a></li>
-<li><a class="reference external" href="#for-windows-users">For Windows Users</a></li>
-<li><a class="reference external" href="#installing-sphinx">Installing Sphinx</a></li>
-<li><a class="reference external" href="#getting-the-development-branch-of-the-book">Getting the Development Branch of the Book</a></li>
-<li><a class="reference external" href="#building-the-book">Building the Book</a></li>
-<li><a class="reference external" href="#building-the-pdf">Building the PDF</a></li>
-<li><a class="reference external" href="#setting-up-mercurial">Setting up Mercurial</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>
+  <h3><a href="index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Developer Guide</a><ul>
+<li><a class="reference internal" href="#getting-started-the-easiest-approach">Getting Started: The Easiest Approach</a></li>
+<li><a class="reference internal" href="#for-windows-users">For Windows Users</a></li>
+<li><a class="reference internal" href="#installing-sphinx">Installing Sphinx</a></li>
+<li><a class="reference internal" href="#getting-the-development-branch-of-the-book">Getting the Development Branch of the Book</a></li>
+<li><a class="reference internal" href="#building-the-book">Building the Book</a></li>
+<li><a class="reference internal" href="#building-the-pdf">Building the PDF</a></li>
+<li><a class="reference internal" href="#setting-up-mercurial">Setting up Mercurial</a></li>
+<li><a class="reference internal" href="#working-with-bitbucket-and-mercurial">Working with BitBucket and Mercurial</a></li>
+<li><a class="reference internal" href="#a-simple-overview-of-editing-and-merging">A Simple Overview Of Editing and Merging</a></li>
+<li><a class="reference internal" href="#emacs-for-editing-restructured-text">Emacs for Editing Restructured Text</a></li>
 </ul>
 </li>
 </ul>
 
 
-            <h4>Previous topic</h4>
-            <p class="topless"><a href="Rules.html"
-                                  title="previous chapter">Book Development Rules</a></p>
-            <h4>Next topic</h4>
-            <p class="topless"><a href="Part1.html"
-                                  title="next chapter">Part I: Foundations</a></p>
-            <h3>This Page</h3>
-            <ul class="this-page-menu">
-              <li><a href="_sources/DeveloperGuide.txt"
-                     rel="nofollow">Show Source</a></li>
-            </ul>
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="Rules.html"
+                        title="previous chapter">Book Development Rules</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="Part1.html"
+                        title="next chapter">Part I: Foundations</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="_sources/DeveloperGuide.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
     
-	  <div id="searchbox" style="display: none">
-            <h3>Quick search</h3>
-              <form class="search" action="search.html" method="get">
-                <input type="text" name="q" size="18" />
-                <input type="submit" value="Go" />
-                <input type="hidden" name="check_keywords" value="yes" />
-                <input type="hidden" name="area" value="default" />
-              </form>
-	      <p style="font-size: 90%">Enter search terms or a module, class or function name.</p>
-          </div>
-          <script type="text/javascript">$('#searchbox').show(0);</script>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
     <h4><a href="http://www.mindviewinc.com/Books/Python3Patterns/Index.php">Project Homepage</a></h4>
     <h4><a href="http://www.bitbucket.org/BruceEckel/python-3-patterns-idioms/issues/">Corrections/Suggestions</a></h4>
     <h4><a href="http://www.mindviewinc.com/Consulting/Index.php">Consulting &amp; Training</a></h4><br><br>
       <ul>
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
-             accesskey="I">index</a></li>
+             >index</a></li>
         <li class="right" >
           <a href="Part1.html" title="Part I: Foundations"
-             accesskey="N">next</a> |</li>
+             >next</a> |</li>
         <li class="right" >
           <a href="Rules.html" title="Book Development Rules"
-             accesskey="P">previous</a> |</li>
+             >previous</a> |</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 Apr 07, 2009.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.
+        &copy; Copyright 2008, Creative Commons Attribution-Share Alike 3.0.
+      Last updated on Jan 10, 2012.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
     </div>
   </body>
 </html>

html/Factory.html

+
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
     <title>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">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
         VERSION:     '1.0',
-        COLLAPSE_MODINDEX: false,
+        COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
       };
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <link rel="shortcut icon" href="_static/favicon.ico"/>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
     <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Function Objects" href="FunctionObjects.html" />
     <link rel="prev" title="Iterators: Decoupling Algorithms from Containers" href="Iterators.html" /> 
         <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li> 
       </ul>
     </div>  
+
     <div class="document">
       <div class="documentwrapper">
         <div class="bodywrapper">
         <span class="c">#return eval(type + &quot;()&quot;)</span>
         <span class="k">if</span> <span class="nb">type</span> <span class="o">==</span> <span class="s">&quot;Circle&quot;</span><span class="p">:</span> <span class="k">return</span> <span class="n">Circle</span><span class="p">()</span>
         <span class="k">if</span> <span class="nb">type</span> <span class="o">==</span> <span class="s">&quot;Square&quot;</span><span class="p">:</span> <span class="k">return</span> <span class="n">Square</span><span class="p">()</span>
-        <span class="k">assert</span> <span class="mf">0</span><span class="p">,</span> <span class="s">&quot;Bad shape creation: &quot;</span> <span class="o">+</span> <span class="nb">type</span>
+        <span class="k">assert</span> <span class="mi">0</span><span class="p">,</span> <span class="s">&quot;Bad shape creation: &quot;</span> <span class="o">+</span> <span class="nb">type</span>
     <span class="n">factory</span> <span class="o">=</span> <span class="nb">staticmethod</span><span class="p">(</span><span class="n">factory</span><span class="p">)</span>
 
 <span class="k">class</span> <span class="nc">Circle</span><span class="p">(</span><span class="n">Shape</span><span class="p">):</span>
         <span class="k">yield</span> <span class="n">random</span><span class="o">.</span><span class="n">choice</span><span class="p">(</span><span class="n">types</span><span class="p">)</span><span class="o">.</span><span class="n">__name__</span>
 
 <span class="n">shapes</span> <span class="o">=</span> \
-  <span class="p">[</span> <span class="n">Shape</span><span class="o">.</span><span class="n">factory</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">shapeNameGen</span><span class="p">(</span><span class="mf">7</span><span class="p">)]</span>
+  <span class="p">[</span> <span class="n">Shape</span><span class="o">.</span><span class="n">factory</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">shapeNameGen</span><span class="p">(</span><span class="mi">7</span><span class="p">)]</span>
 
 <span class="k">for</span> <span class="n">shape</span> <span class="ow">in</span> <span class="n">shapes</span><span class="p">:</span>
     <span class="n">shape</span><span class="o">.</span><span class="n">draw</span><span class="p">()</span>
 <p>Thus, the code that you write is actually a kind of factory, that creates the
 generator objects that do the actual generation. You can use the generator
 explicitly if you want, for example:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">gen</span> <span class="o">=</span> <span class="n">shapeNameGen</span><span class="p">(</span><span class="mf">7</span><span class="p">)</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">gen</span> <span class="o">=</span> <span class="n">shapeNameGen</span><span class="p">(</span><span class="mi">7</span><span class="p">)</span>
 <span class="k">print</span><span class="p">(</span><span class="n">gen</span><span class="o">.</span><span class="n">next</span><span class="p">())</span>
 </pre></div>
 </div>
 
     <span class="k">if</span> <span class="nb">type</span> <span class="o">==</span> <span class="s">&quot;Circle&quot;</span><span class="p">:</span> <span class="k">return</span> <span class="n">Circle</span><span class="p">()</span>
     <span class="k">if</span> <span class="nb">type</span> <span class="o">==</span> <span class="s">&quot;Square&quot;</span><span class="p">:</span> <span class="k">return</span> <span class="n">Square</span><span class="p">()</span>
-    <span class="k">assert</span> <span class="mf">0</span><span class="p">,</span> <span class="s">&quot;Bad shape creation: &quot;</span> <span class="o">+</span> <span class="nb">type</span>
+    <span class="k">assert</span> <span class="mi">0</span><span class="p">,</span> <span class="s">&quot;Bad shape creation: &quot;</span> <span class="o">+</span> <span class="nb">type</span>
 
 <span class="k">def</span> <span class="nf">shapeNameGen</span><span class="p">(</span><span class="n">n</span><span class="p">):</span>
     <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">n</span><span class="p">):</span>
 
 <span class="c"># Circle() # Not defined</span>
 
-<span class="k">for</span> <span class="n">shape</span> <span class="ow">in</span> <span class="n">shapeNameGen</span><span class="p">(</span><span class="mf">7</span><span class="p">):</span>
+<span class="k">for</span> <span class="n">shape</span> <span class="ow">in</span> <span class="n">shapeNameGen</span><span class="p">(</span><span class="mi">7</span><span class="p">):</span>
     <span class="n">shape</span><span class="o">.</span><span class="n">draw</span><span class="p">()</span>
     <span class="n">shape</span><span class="o">.</span><span class="n">erase</span><span class="p">()</span>
 </pre></div>
         <span class="k">yield</span> <span class="n">random</span><span class="o">.</span><span class="n">choice</span><span class="p">(</span><span class="n">types</span><span class="p">)</span><span class="o">.</span><span class="n">__name__</span>
 
 <span class="n">shapes</span> <span class="o">=</span> <span class="p">[</span> <span class="n">ShapeFactory</span><span class="o">.</span><span class="n">createShape</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
-           <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">shapeNameGen</span><span class="p">(</span><span class="mf">7</span><span class="p">)]</span>
+           <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">shapeNameGen</span><span class="p">(</span><span class="mi">7</span><span class="p">)]</span>
 
 <span class="k">for</span> <span class="n">shape</span> <span class="ow">in</span> <span class="n">shapes</span><span class="p">:</span>
     <span class="n">shape</span><span class="o">.</span><span class="n">draw</span><span class="p">()</span>
             </a></p>
     <font color="Red">This book is in early development; you will find parts that are incorrect &amp; incomplete.</font>
     
-            <h3><a href="index.html">Table Of Contents</a></h3>
-            <ul>
-<li><a class="reference external" href="">Factory: Encapsulating Object Creation</a><ul>
-<li><a class="reference external" href="#simple-factory-method">Simple Factory Method</a><ul>
-<li><a class="reference external" href="#preventing-direct-creation">Preventing direct creation</a></li>
+  <h3><a href="index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Factory: Encapsulating Object Creation</a><ul>
+<li><a class="reference internal" href="#simple-factory-method">Simple Factory Method</a><ul>
+<li><a class="reference internal" href="#preventing-direct-creation">Preventing direct creation</a></li>
 </ul>
 </li>
-<li><a class="reference external" href="#polymorphic-factories">Polymorphic Factories</a></li>
-<li><a class="reference external" href="#abstract-factories">Abstract Factories</a></li>
-<li><a class="reference external" href="#exercises">Exercises</a></li>
+<li><a class="reference internal" href="#polymorphic-factories">Polymorphic Factories</a></li>
+<li><a class="reference internal" href="#abstract-factories">Abstract Factories</a></li>
+<li><a class="reference internal" href="#exercises">Exercises</a></li>
 </ul>
 </li>
 </ul>
 
 
-            <h4>Previous topic</h4>
-            <p class="topless"><a href="Iterators.html"
-                                  title="previous chapter">Iterators: Decoupling Algorithms from Containers</a></p>
-            <h4>Next topic</h4>
-            <p class="topless"><a href="FunctionObjects.html"
-                                  title="next chapter">Function Objects</a></p>
-            <h3>This Page</h3>
-            <ul class="this-page-menu">
-              <li><a href="_sources/Factory.txt"
-                     rel="nofollow">Show Source</a></li>
-            </ul>
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="Iterators.html"
+                        title="previous chapter">Iterators: Decoupling Algorithms from Containers</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="FunctionObjects.html"
+                        title="next chapter">Function Objects</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="_sources/Factory.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
     
-	  <div id="searchbox" style="display: none">
-            <h3>Quick search</h3>
-              <form class="search" action="search.html" method="get">
-                <input type="text" name="q" size="18" />
-                <input type="submit" value="Go" />
-                <input type="hidden" name="check_keywords" value="yes" />
-                <input type="hidden" name="area" value="default" />
-              </form>
-	      <p style="font-size: 90%">Enter search terms or a module, class or function name.</p>
-          </div>
-          <script type="text/javascript">$('#searchbox').show(0);</script>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
     <h4><a href="http://www.mindviewinc.com/Books/Python3Patterns/Index.php">Project Homepage</a></h4>
     <h4><a href="http://www.bitbucket.org/BruceEckel/python-3-patterns-idioms/issues/">Corrections/Suggestions</a></h4>
     <h4><a href="http://www.mindviewinc.com/Consulting/Index.php">Consulting &amp; Training</a></h4><br><br>
       <ul>
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
-             accesskey="I">index</a></li>
+             >index</a></li>
         <li class="right" >
           <a href="FunctionObjects.html" title="Function Objects"
-             accesskey="N">next</a> |</li>
+             >next</a> |</li>
         <li class="right" >
           <a href="Iterators.html" title="Iterators: Decoupling Algorithms from Containers"
-             accesskey="P">previous</a> |</li>
+             >previous</a> |</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 Apr 07, 2009.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.
+        &copy; Copyright 2008, Creative Commons Attribution-Share Alike 3.0.
+      Last updated on Jan 10, 2012.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
     </div>
   </body>
 </html>

html/Fronting.html

+
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
     <title>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">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
         VERSION:     '1.0',
-        COLLAPSE_MODINDEX: false,
+        COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
       };
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <link rel="shortcut icon" href="_static/favicon.ico"/>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
     <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="StateMachine" href="StateMachine.html" />
     <link rel="prev" title="Building Application Frameworks" href="AppFrameworks.html" /> 
         <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li> 
       </ul>
     </div>  
+
     <div class="document">
       <div class="documentwrapper">
         <div class="bodywrapper">
             </a></p>
     <font color="Red">This book is in early development; you will find parts that are incorrect &amp; incomplete.</font>
     
-            <h3><a href="index.html">Table Of Contents</a></h3>
-            <ul>
-<li><a class="reference external" href="">Fronting for an Implementation</a><ul>
-<li><a class="reference external" href="#proxy">Proxy</a></li>
-<li><a class="reference external" href="#state">State</a></li>
+  <h3><a href="index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Fronting for an Implementation</a><ul>
+<li><a class="reference internal" href="#proxy">Proxy</a></li>
+<li><a class="reference internal" href="#state">State</a></li>
 </ul>
 </li>
 </ul>
 
 
-            <h4>Previous topic</h4>
-            <p class="topless"><a href="AppFrameworks.html"
-                                  title="previous chapter">Building Application Frameworks</a></p>
-            <h4>Next topic</h4>
-            <p class="topless"><a href="StateMachine.html"
-                                  title="next chapter">StateMachine</a></p>
-            <h3>This Page</h3>
-            <ul class="this-page-menu">
-              <li><a href="_sources/Fronting.txt"
-                     rel="nofollow">Show Source</a></li>
-            </ul>
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="AppFrameworks.html"
+                        title="previous chapter">Building Application Frameworks</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="StateMachine.html"
+                        title="next chapter">StateMachine</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="_sources/Fronting.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
     
-	  <div id="searchbox" style="display: none">
-            <h3>Quick search</h3>
-              <form class="search" action="search.html" method="get">
-                <input type="text" name="q" size="18" />
-                <input type="submit" value="Go" />
-                <input type="hidden" name="check_keywords" value="yes" />
-                <input type="hidden" name="area" value="default" />
-              </form>
-	      <p style="font-size: 90%">Enter search terms or a module, class or function name.</p>
-          </div>
-          <script type="text/javascript">$('#searchbox').show(0);</script>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
     <h4><a href="http://www.mindviewinc.com/Books/Python3Patterns/Index.php">Project Homepage</a></h4>
     <h4><a href="http://www.bitbucket.org/BruceEckel/python-3-patterns-idioms/issues/">Corrections/Suggestions</a></h4>
     <h4><a href="http://www.mindviewinc.com/Consulting/Index.php">Consulting &amp; Training</a></h4><br><br>
       <ul>
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
-             accesskey="I">index</a></li>
+             >index</a></li>
         <li class="right" >
           <a href="StateMachine.html" title="StateMachine"
-             accesskey="N">next</a> |</li>
+             >next</a> |</li>
         <li class="right" >
           <a href="AppFrameworks.html" title="Building Application Frameworks"
-             accesskey="P">previous</a> |</li>
+             >previous</a> |</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 Apr 07, 2009.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.
+        &copy; Copyright 2008, Creative Commons Attribution-Share Alike 3.0.
+      Last updated on Jan 10, 2012.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
     </div>
   </body>
 </html>

html/FunctionObjects.html

+
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
     <title>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">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
         VERSION:     '1.0',
-        COLLAPSE_MODINDEX: false,
+        COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
       };
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <link rel="shortcut icon" href="_static/favicon.ico"/>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
     <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Changing the Interface" href="ChangeInterface.html" />
     <link rel="prev" title="Factory: Encapsulating Object Creation" href="Factory.html" /> 
         <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li> 
       </ul>
     </div>  
+
     <div class="document">
       <div class="documentwrapper">
         <div class="bodywrapper">
 <span class="c"># whether the strategy was successful:</span>
 <span class="k">class</span> <span class="nc">Result</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="bp">self</span><span class="o">.</span><span class="n">succeeded</span> <span class="o">=</span> <span class="mf">0</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">succeeded</span> <span class="o">=</span> <span class="mi">0</span>
     <span class="k">def</span> <span class="nf">isSuccessful</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
         <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">succeeded</span>
     <span class="k">def</span> <span class="nf">setSuccessful</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">succeeded</span><span class="p">):</span>
         <span class="c"># Where this link is in the chain:</span>
         <span class="n">location</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">chain</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
         <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">end</span><span class="p">():</span>
-            <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">chain</span><span class="p">[</span><span class="n">location</span> <span class="o">+</span> <span class="mf">1</span><span class="p">]</span>
+            <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">chain</span><span class="p">[</span><span class="n">location</span> <span class="o">+</span> <span class="mi">1</span><span class="p">]</span>
 
     <span class="k">def</span> <span class="nf">end</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
-        <span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">chain</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">+</span> <span class="mf">1</span> <span class="o">&gt;=</span>
+        <span class="k">return</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">chain</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1</span> <span class="o">&gt;=</span>
                 <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">chain</span><span class="p">))</span>
 
     <span class="k">def</span> <span class="nf">__call__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">messenger</span><span class="p">):</span>
         <span class="n">linedata</span> <span class="o">=</span> <span class="n">messenger</span>
         <span class="c"># [ Actual test/calculation here ]</span>
         <span class="n">result</span> <span class="o">=</span> <span class="n">LineData</span><span class="p">([</span><span class="mf">1.1</span><span class="p">,</span> <span class="mf">2.2</span><span class="p">])</span> <span class="c"># Dummy data</span>
-        <span class="n">result</span><span class="o">.</span><span class="n">setSuccessful</span><span class="p">(</span><span class="mf">0</span><span class="p">)</span>
+        <span class="n">result</span><span class="o">.</span><span class="n">setSuccessful</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
         <span class="k">return</span> <span class="n">result</span>
 
 <span class="k">class</span> <span class="nc">NewtonsMethod</span><span class="p">(</span><span class="n">Strategy</span><span class="p">):</span>
         <span class="n">linedata</span> <span class="o">=</span> <span class="n">messenger</span>
         <span class="c"># [ Actual test/calculation here ]</span>
         <span class="n">result</span> <span class="o">=</span> <span class="n">LineData</span><span class="p">([</span><span class="mf">3.3</span><span class="p">,</span> <span class="mf">4.4</span><span class="p">])</span> <span class="c"># Dummy data</span>
-        <span class="n">result</span><span class="o">.</span><span class="n">setSuccessful</span><span class="p">(</span><span class="mf">0</span><span class="p">)</span>
+        <span class="n">result</span><span class="o">.</span><span class="n">setSuccessful</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
         <span class="k">return</span> <span class="n">result</span>
 
 <span class="k">class</span> <span class="nc">Bisection</span><span class="p">(</span><span class="n">Strategy</span><span class="p">):</span>
         <span class="n">linedata</span> <span class="o">=</span> <span class="n">messenger</span>
         <span class="c"># [ Actual test/calculation here ]</span>
         <span class="n">result</span> <span class="o">=</span> <span class="n">LineData</span><span class="p">([</span><span class="mf">5.5</span><span class="p">,</span> <span class="mf">6.6</span><span class="p">])</span> <span class="c"># Dummy data</span>
-        <span class="n">result</span><span class="o">.</span><span class="n">setSuccessful</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span>
+        <span class="n">result</span><span class="o">.</span><span class="n">setSuccessful</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
         <span class="k">return</span> <span class="n">result</span>
 
 <span class="k">class</span> <span class="nc">ConjugateGradient</span><span class="p">(</span><span class="n">Strategy</span><span class="p">):</span>
         <span class="n">linedata</span> <span class="o">=</span> <span class="n">messenger</span>
         <span class="c"># [ Actual test/calculation here ]</span>
         <span class="n">result</span> <span class="o">=</span> <span class="n">LineData</span><span class="p">([</span><span class="mf">7.7</span><span class="p">,</span> <span class="mf">8.8</span><span class="p">])</span> <span class="c"># Dummy data</span>
-        <span class="n">result</span><span class="o">.</span><span class="n">setSuccessful</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span>
+        <span class="n">result</span><span class="o">.</span><span class="n">setSuccessful</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
         <span class="k">return</span> <span class="n">result</span>
 
 <span class="n">solutions</span> <span class="o">=</span> <span class="p">[]</span>
   <span class="mf">3.0</span><span class="p">,</span> <span class="mf">4.0</span><span class="p">,</span> <span class="mf">5.0</span><span class="p">,</span> <span class="mf">4.0</span>
 <span class="p">])</span>
 
-<span class="k">print</span><span class="p">(</span><span class="n">solutions</span><span class="p">[</span><span class="mf">0</span><span class="p">](</span><span class="n">line</span><span class="p">))</span>
+<span class="k">print</span><span class="p">(</span><span class="n">solutions</span><span class="p">[</span><span class="mi">0</span><span class="p">](</span><span class="n">line</span><span class="p">))</span>
 </pre></div>
 </div>
 </div>
             </a></p>
     <font color="Red">This book is in early development; you will find parts that are incorrect &amp; incomplete.</font>
     
-            <h3><a href="index.html">Table Of Contents</a></h3>
-            <ul>
-<li><a class="reference external" href="">Function Objects</a><ul>
-<li><a class="reference external" href="#command-choosing-the-operation-at-runtime">Command: Choosing the Operation at Runtime</a></li>
-<li><a class="reference external" href="#strategy-choosing-the-algorithm-at-runtime">Strategy: Choosing the Algorithm at Runtime</a></li>
-<li><a class="reference external" href="#chain-of-responsibility">Chain of Responsibility</a></li>
-<li><a class="reference external" href="#exercises">Exercises</a></li>
+  <h3><a href="index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Function Objects</a><ul>
+<li><a class="reference internal" href="#command-choosing-the-operation-at-runtime">Command: Choosing the Operation at Runtime</a></li>
+<li><a class="reference internal" href="#strategy-choosing-the-algorithm-at-runtime">Strategy: Choosing the Algorithm at Runtime</a></li>
+<li><a class="reference internal" href="#chain-of-responsibility">Chain of Responsibility</a></li>
+<li><a class="reference internal" href="#exercises">Exercises</a></li>
 </ul>
 </li>
 </ul>
 
 
-            <h4>Previous topic</h4>
-            <p class="topless"><a href="Factory.html"
-                                  title="previous chapter">Factory: Encapsulating Object Creation</a></p>
-            <h4>Next topic</h4>
-            <p class="topless"><a href="ChangeInterface.html"
-                                  title="next chapter">Changing the Interface</a></p>
-            <h3>This Page</h3>
-            <ul class="this-page-menu">
-              <li><a href="_sources/FunctionObjects.txt"
-                     rel="nofollow">Show Source</a></li>
-            </ul>
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="Factory.html"
+                        title="previous chapter">Factory: Encapsulating Object Creation</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="ChangeInterface.html"
+                        title="next chapter">Changing the Interface</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="_sources/FunctionObjects.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
     
-	  <div id="searchbox" style="display: none">
-            <h3>Quick search</h3>
-              <form class="search" action="search.html" method="get">
-                <input type="text" name="q" size="18" />
-                <input type="submit" value="Go" />
-                <input type="hidden" name="check_keywords" value="yes" />
-                <input type="hidden" name="area" value="default" />
-              </form>
-	      <p style="font-size: 90%">Enter search terms or a module, class or function name.</p>
-          </div>
-          <script type="text/javascript">$('#searchbox').show(0);</script>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
     <h4><a href="http://www.mindviewinc.com/Books/Python3Patterns/Index.php">Project Homepage</a></h4>
     <h4><a href="http://www.bitbucket.org/BruceEckel/python-3-patterns-idioms/issues/">Corrections/Suggestions</a></h4>
     <h4><a href="http://www.mindviewinc.com/Consulting/Index.php">Consulting &amp; Training</a></h4><br><br>
       <ul>
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
-             accesskey="I">index</a></li>
+             >index</a></li>
         <li class="right" >
           <a href="ChangeInterface.html" title="Changing the Interface"
-             accesskey="N">next</a> |</li>
+             >next</a> |</li>
         <li class="right" >
           <a href="Factory.html" title="Factory: Encapsulating Object Creation"
-             accesskey="P">previous</a> |</li>
+             >previous</a> |</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 Apr 07, 2009.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.
+        &copy; Copyright 2008, Creative Commons Attribution-Share Alike 3.0.
+      Last updated on Jan 10, 2012.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
     </div>
   </body>
 </html>

html/FunctionalProgramming.html

     </div>
     <div class="footer">
         &copy; Copyright 2008, Creative Commons Attribution-Share Alike 3.0.
-      Last updated on Jan 08, 2012.
+      Last updated on Jan 10, 2012.
       Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
     </div>
   </body>

html/GeneratorsIterators.html

+
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
     <title>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">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
         VERSION:     '1.0',
-        COLLAPSE_MODINDEX: false,
+        COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
       };
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <link rel="shortcut icon" href="_static/favicon.ico"/>
-    <link rel="index" title="Index" href="genindex.html" />
-    <link rel="search" title="Search" href="search.html" />
     <link rel="top" title="Python 3 Patterns, Recipes and Idioms" href="index.html" />
     <link rel="next" title="Comprehensions" href="Comprehensions.html" />
-    <link rel="prev" title="Decorators" href="PythonDecorators.html" /> 
+    <link rel="prev" title="Metaprogramming" href="Metaprogramming.html" /> 
   </head>
   <body>
     <div class="related">
           <a href="Comprehensions.html" title="Comprehensions"
              accesskey="N">next</a> |</li>
         <li class="right" >
-          <a href="PythonDecorators.html" title="Decorators"
+          <a href="Metaprogramming.html" title="Metaprogramming"
              accesskey="P">previous</a> |</li>
         <li><a href="index.html">Python 3 Patterns, Recipes and Idioms</a> &raquo;</li> 
       </ul>
     </div>  
+
     <div class="document">
       <div class="documentwrapper">
         <div class="bodywrapper">
           <div class="body">
             
   <div class="section" id="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-0"></span><h1>Generators, Iterators, and Itertools<a class="headerlink" href="#generators-iterators-and-itertools" title="Permalink to this headline">¶</a></h1>
 </div>
 
 
     <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="PythonDecorators.html"
-                                  title="previous chapter">Decorators</a></p>
-            <h4>Next topic</h4>
-            <p class="topless"><a href="Comprehensions.html"
-                                  title="next chapter">Comprehensions</a></p>
-            <h3>This Page</h3>
-            <ul class="this-page-menu">
-              <li><a href="_sources/GeneratorsIterators.txt"
-                     rel="nofollow">Show Source</a></li>
-            </ul>
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="Metaprogramming.html"
+                        title="previous chapter">Metaprogramming</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="Comprehensions.html"
+                        title="next chapter">Comprehensions</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="_sources/GeneratorsIterators.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
     
-	  <div id="searchbox" style="display: none">
-            <h3>Quick search</h3>
-              <form class="search" action="search.html" method="get">
-                <input type="text" name="q" size="18" />
-                <input type="submit" value="Go" />
-                <input type="hidden" name="check_keywords" value="yes" />
-                <input type="hidden" name="area" value="default" />
-              </form>
-	      <p style="font-size: 90%">Enter search terms or a module, class or function name.</p>
-          </div>
-          <script type="text/javascript">$('#searchbox').show(0);</script>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
     <h4><a href="http://www.mindviewinc.com/Books/Python3Patterns/Index.php">Project Homepage</a></h4>
     <h4><a href="http://www.bitbucket.org/BruceEckel/python-3-patterns-idioms/issues/">Corrections/Suggestions</a></h4>
     <h4><a href="http://www.mindviewinc.com/Consulting/Index.php">Consulting &amp; Training</a></h4><br><br>
       <ul>
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
-             accesskey="I">index</a></li>
+             >index</a></li>
         <li class="right" >
           <a href="Comprehensions.html" title="Comprehensions"
-             accesskey="N">next</a> |</li>
+             >next</a> |</li>
         <li class="right" >
-          <a href="PythonDecorators.html" title="Decorators"
-             accesskey="P">previous</a> |</li>
+          <a href="Metaprogramming.html" title="Metaprogramming"
+             >previous</a> |</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 Apr 07, 2009.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.
+        &copy; Copyright 2008, Creative Commons Attribution-Share Alike 3.0.
+      Last updated on Jan 10, 2012.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
     </div>
   </body>
 </html>

html/InitializationAndCleanup.html

+
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
+
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
     <title>Initialization and Cleanup &mdash; Python 3 Patterns, Recipes and Idioms</title>
+    
     <link rel="stylesheet" href="_static/default.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
         VERSION:     '1.0',
-        COLLAPSE_MODINDEX: false,
+        COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
       };
     </script>
     <script type="text/javascript" src="_static/jquery.js"&