From 6000650631cf8e7a6f84ffd99ce6817f8158ef26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Fri, 21 Jun 2019 08:42:35 +0200 Subject: [PATCH] Iterator --- README.md | 3 +-- index.html | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 52344f7..83a15ba 100644 --- a/README.md +++ b/README.md @@ -178,9 +178,8 @@ Point(x=1, y=2) Iterator -------- -**Iterator is any object with next() special method.** ```python - = iter() # Calling `iter()` returns the same object. + = iter() = iter(, to_exclusive) # Sequence of return values until 'to_exclusive'. = next( [, default]) # Raises StopIteration or returns 'default' on end. ``` diff --git a/index.html b/index.html index 15636f1..8464b69 100644 --- a/index.html +++ b/index.html @@ -320,8 +320,7 @@ Point(x=1, y=2 ('x', 'y')

#Iterator

-

Iterator is any object with next() special method.

-
<iter> = iter(<collection>)                 # Calling `iter(<iter>)` returns the same object.
+
<iter> = iter(<collection>)
 <iter> = iter(<function>, to_exclusive)     # Sequence of return values until 'to_exclusive'.
 <el>   = next(<iter> [, default])           # Raises StopIteration or returns 'default' on end.