various typos [thanks G.P.]

This commit is contained in:
Mark Pilgrim
2009-06-01 12:19:43 -07:00
parent 992b4bd18b
commit bca614e2be
6 changed files with 104 additions and 30 deletions
+3 -3
View File
@@ -26,7 +26,7 @@ body{counter-reset:h1 6}
<p class=d>[<a href=examples/fibonacci2.py>download <code>fibonacci2.py</code></a>]
<pre><code>class Fib:
"""iterator that yields numbers in the Fibanocci sequence"""
"""iterator that yields numbers in the Fibonacci sequence"""
def __init__(self, max):
self.max = max
@@ -79,7 +79,7 @@ class PapayaWhip: <span>&#x2460;</span>
<pre><code>
class Fib:
<a> """iterator that yields numbers in the Fibanocci sequence""" <span>&#x2460;</span></a>
<a> """iterator that yields numbers in the Fibonacci sequence""" <span>&#x2460;</span></a>
<a> def __init__(self, max): <span>&#x2461;</span></a></code></pre>
<ol>
@@ -104,7 +104,7 @@ class Fib:
<a><samp class=p>>>> </samp><kbd>fib.__class__</kbd> <span>&#x2462;</span></a>
<samp>&lt;class 'fibonacci2.Fib'></samp>
<a><samp class=p>>>> </samp><kbd>fib.__doc__</kbd> <span>&#x2463;</span></a>
<samp>'iterator that yields numbers in the Fibanocci sequence'</samp></pre>
<samp>'iterator that yields numbers in the Fibonacci sequence'</samp></pre>
<ol>
<li>You are creating an instance of the <code>Fib</code> class (defined in the <code>fibonacci2</code> module) and assigning the newly created instance to the variable <var>fib</var>. You are passing one parameter, <code>100</code>, which will end up as the <var>max</var> argument in <code>Fib</code>&#8217;s <code>__init__()</code> method.
<li><var>fib</var> is now an instance of the <code>Fib</code> class.