Browse Source

Duck types

pull/156/head
Jure Šorn 1 year ago
parent
commit
74cb6db04c
2 changed files with 2 additions and 2 deletions
  1. 2
      README.md
  2. 2
      index.html

2
README.md

@ -1262,7 +1262,7 @@ class MyCollection:
```
### Sequence
* **Only required methods are len() and getitem().**
* **Only required methods are getitem() and len().**
* **Getitem() should return an item at the passed index or raise IndexError.**
* **Iter() and contains() automatically work on any object that has getitem() defined.**
* **Reversed() automatically works on any object that has getitem() and len() defined.**

2
index.html

@ -1081,7 +1081,7 @@ Hello World!
<div><h3 id="sequence">Sequence</h3><ul>
<li><strong>Only required methods are len() and getitem().</strong></li>
<li><strong>Only required methods are getitem() and len().</strong></li>
<li><strong>Getitem() should return an item at the passed index or raise IndexError.</strong></li>
<li><strong>Iter() and contains() automatically work on any object that has getitem() defined.</strong></li>
<li><strong>Reversed() automatically works on any object that has getitem() and len() defined.</strong></li>

Loading…
Cancel
Save