From f96dc9d2658e9b573ea7ff030ee9a5d3e84884ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sun, 5 Jan 2020 20:08:17 +0100 Subject: [PATCH] Duck types --- README.md | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 59d03bd..8834e91 100644 --- a/README.md +++ b/README.md @@ -1127,7 +1127,7 @@ class MySortable: ``` ### Iterator -* **Any object that defines methods next() and iter() is an iterator.** +* **Any object that has methods next() and iter() is an iterator.** * **Next() should return next item or raise StopIteration.** * **Iter() should return 'self'.** ```python diff --git a/index.html b/index.html index 529ca9e..25e29af 100644 --- a/index.html +++ b/index.html @@ -1072,7 +1072,7 @@ Z = dataclasses.make_dataclass('Z', [

Iterator

class Counter: