diff --git a/README.md b/README.md index 84f0bd8..4f44d1b 100644 --- a/README.md +++ b/README.md @@ -1101,6 +1101,8 @@ class MySortable: ``` ### Iterator +* **Next() should return next item or raise 'StopIteration'.** +* **Iter() should return 'self'.** ```python class Counter: def __init__(self): @@ -1205,7 +1207,7 @@ class MyCollection: ``` ### Sequence -* **Only required methods are len() and getitem().** +* **Only required methods are len() and getitem(), that should return an item at 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.** ```python diff --git a/index.html b/index.html index e260b27..bb91ed6 100644 --- a/index.html +++ b/index.html @@ -1034,6 +1034,10 @@ Z = dataclasses.make_dataclass('Z', [return NotImplemented
class Counter:
def __init__(self):
self.i = 0
@@ -1120,7 +1124,7 @@ lock = threading.RLock(); with lock: ...