Skip to content

Commit 09e41f6

Browse files
committed
Iterator
1 parent ca83f4e commit 09e41f6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ from itertools import count, repeat, cycle, chain, islice
215215
```
216216

217217
```python
218-
<iter> = islice(<collection>, to_exclusive)
219-
<iter> = islice(<collection>, from_inclusive, to_exclusive [, +step_size])
218+
<iter> = islice(<coll>, to_exclusive) # Only returns first 'to_exclusive' elements.
219+
<iter> = islice(<coll>, from_inclusive, …) # `to_exclusive [, +step_size]`.
220220
```
221221

222222

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,8 @@
370370
<pre><code class="python language-python hljs">&lt;iter&gt; = chain(&lt;coll_1&gt;, &lt;coll_2&gt; [, ...]) <span class="hljs-comment"># Empties collections in order.</span>
371371
&lt;iter&gt; = chain.from_iterable(&lt;collection&gt;) <span class="hljs-comment"># Empties collections inside a collection in order.</span>
372372
</code></pre>
373-
<pre><code class="python language-python hljs">&lt;iter&gt; = islice(&lt;collection&gt;, to_exclusive)
374-
&lt;iter&gt; = islice(&lt;collection&gt;, from_inclusive, to_exclusive [, +step_size])
373+
<pre><code class="python language-python hljs">&lt;iter&gt; = islice(&lt;coll&gt;, to_exclusive) <span class="hljs-comment"># Only returns first 'to_exclusive' elements.</span>
374+
&lt;iter&gt; = islice(&lt;coll&gt;, from_inclusive, …) <span class="hljs-comment"># `to_exclusive [, +step_size]`.</span>
375375
</code></pre>
376376
<div><h2 id="generator"><a href="#generator" name="generator">#</a>Generator</h2><ul>
377377
<li><strong>Any function that contains a yield statement returns a generator.</strong></li>

0 commit comments

Comments
 (0)