Skip to content

Commit 6000650

Browse files
committed
Iterator
1 parent 45c69da commit 6000650

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,8 @@ Point(x=1, y=2)
178178

179179
Iterator
180180
--------
181-
**Iterator is any object with next() special method.**
182181
```python
183-
<iter> = iter(<collection>) # Calling `iter(<iter>)` returns the same object.
182+
<iter> = iter(<collection>)
184183
<iter> = iter(<function>, to_exclusive) # Sequence of return values until 'to_exclusive'.
185184
<el> = next(<iter> [, default]) # Raises StopIteration or returns 'default' on end.
186185
```

index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,7 @@ <h2 id="namedtuple"><a href="#namedtuple" name="namedtuple">#</a>Named Tuple</h2
320320
(<span class="hljs-string">'x'</span>, <span class="hljs-string">'y'</span>)
321321
</code></pre>
322322
<h2 id="iterator"><a href="#iterator" name="iterator">#</a>Iterator</h2>
323-
<p><strong>Iterator is any object with next() special method.</strong></p>
324-
<pre><code class="python language-python hljs">&lt;iter&gt; = iter(&lt;collection&gt;) <span class="hljs-comment"># Calling `iter(&lt;iter&gt;)` returns the same object.</span>
323+
<pre><code class="python language-python hljs">&lt;iter&gt; = iter(&lt;collection&gt;)
325324
&lt;iter&gt; = iter(&lt;function&gt;, to_exclusive) <span class="hljs-comment"># Sequence of return values until 'to_exclusive'.</span>
326325
&lt;el&gt; = next(&lt;iter&gt; [, default]) <span class="hljs-comment"># Raises StopIteration or returns 'default' on end.</span>
327326
</code></pre>

0 commit comments

Comments
 (0)