|
|
@ -1087,7 +1087,7 @@ con = sqlite3.connect(<span class="hljs-string">'<path>'</span>); <span c |
|
|
|
<h2 id="iterableducktypes"><a href="#iterableducktypes" name="iterableducktypes">#</a>Iterable Duck Types</h2> |
|
|
|
<h3 id="iterable">Iterable</h3> |
|
|
|
<ul> |
|
|
|
<li><strong>Only required method is iter(). It should return an iterator of its contents.</strong></li> |
|
|
|
<li><strong>Only required method is iter(). It should return an iterator of object's items.</strong></li> |
|
|
|
<li><strong>Contains() automatically works on any object that has iter() defined.</strong></li> |
|
|
|
</ul> |
|
|
|
<pre><code class="python language-python hljs"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MyIterable</span>:</span> |
|
|
|