Skip to content

Commit f96dc9d

Browse files
committed
Duck types
1 parent 5607310 commit f96dc9d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ class MySortable:
11271127
```
11281128

11291129
### Iterator
1130-
* **Any object that defines methods next() and iter() is an iterator.**
1130+
* **Any object that has methods next() and iter() is an iterator.**
11311131
* **Next() should return next item or raise StopIteration.**
11321132
* **Iter() should return 'self'.**
11331133
```python

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@
10721072

10731073

10741074
<div><h3 id="iterator-1">Iterator</h3><ul>
1075-
<li><strong>Any object that defines methods next() and iter() is an iterator.</strong></li>
1075+
<li><strong>Any object that has methods next() and iter() is an iterator.</strong></li>
10761076
<li><strong>Next() should return next item or raise StopIteration.</strong></li>
10771077
<li><strong>Iter() should return 'self'.</strong></li>
10781078
</ul><pre><code class="python language-python hljs"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Counter</span>:</span>

0 commit comments

Comments
 (0)