mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
validation fiddling
This commit is contained in:
+1
-1
@@ -97,7 +97,7 @@ class Fib:
|
||||
<a><samp class=p>>>> </samp><kbd>fib.__class__</kbd> <span>③</span></a>
|
||||
<samp><class 'fibonacci2.Fib'></samp>
|
||||
<a><samp class=p>>>> </samp><kbd>fib.__doc__</kbd> <span>④</span></a>
|
||||
<samp>'iterator that yields numbers in the Fibanocci sequence'</samp></code></pre>
|
||||
<samp>'iterator that yields numbers in the Fibanocci 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>’s <code>__init__()</code> method.
|
||||
<li><var>fib</var> is now an instance of the <code>Fib</code> class.
|
||||
|
||||
Reference in New Issue
Block a user