Skip to content

Commit 63fc68d

Browse files
committed
Iterable duck types
1 parent 2fd5893 commit 63fc68d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,8 @@ class MyCollection:
12151215
```
12161216

12171217
### Sequence
1218-
* **Only required methods are len() and getitem(), that should return an item at index or raise 'IndexError'.**
1218+
* **Only required methods are len() and getitem().**
1219+
* **Getitem() should return an item at index or raise 'IndexError'.**
12191220
* **Iter() and contains() automatically work on any object that has getitem() defined.**
12201221
* **Reversed() automatically works on any object that has getitem() and len() defined.**
12211222
```python

index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,8 @@ <h3 id="collection">Collection</h3>
11301130
</code></pre>
11311131
<h3 id="sequence">Sequence</h3>
11321132
<ul>
1133-
<li><strong>Only required methods are len() and getitem(), that should return an item at index or raise 'IndexError'.</strong></li>
1133+
<li><strong>Only required methods are len() and getitem().</strong></li>
1134+
<li><strong>Getitem() should return an item at index or raise 'IndexError'.</strong></li>
11341135
<li><strong>Iter() and contains() automatically work on any object that has getitem() defined.</strong></li>
11351136
<li><strong>Reversed() automatically works on any object that has getitem() and len() defined.</strong></li>
11361137
</ul>

0 commit comments

Comments
 (0)