Browse Source

MySequence

pull/36/head
Jure Šorn 5 years ago
parent
commit
589c7aead8
2 changed files with 4 additions and 2 deletions
  1. 3
      README.md
  2. 3
      index.html

3
README.md

@ -1206,7 +1206,8 @@ class MyCollection:
### Sequence
* **Only required methods are len() and getitem().**
* **Iter(), contains() and reversed() automatically work on any object that has getitem() defined.**
* **Iter() and contains() automatically work on any object that has getitem() defined.**
* **Reversed() automatically works on any object that has getitem() and len() defined.**
```python
class MySequence:
def __init__(self, a):

3
index.html

@ -1121,7 +1121,8 @@ lock = threading.RLock(); <span class="hljs-keyword">with</span> lock: ...
<h3 id="sequence">Sequence</h3>
<ul>
<li><strong>Only required methods are len() and getitem().</strong></li>
<li><strong>Iter(), contains() and reversed() automatically work on any object that has getitem() defined.</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>
</ul>
<pre><code class="python language-python hljs"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MySequence</span>:</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span><span class="hljs-params">(self, a)</span>:</span>

Loading…
Cancel
Save