Browse Source

Iterator

pull/135/head
Jure Šorn 2 years ago
parent
commit
64e1e9e925
2 changed files with 4 additions and 4 deletions
  1. 2
      README.md
  2. 6
      index.html

2
README.md

@ -216,7 +216,7 @@ from itertools import count, repeat, cycle, chain, islice
```python
<iter> = islice(<coll>, to_exclusive) # Only returns first 'to_exclusive' elements.
<iter> = islice(<coll>, from_inclusive, …) # `to_exclusive, +step_size`.
<iter> = islice(<coll>, from_inclusive, …) # `to_exclusive, +step_size`. Indices can be None.
```

6
index.html

@ -54,7 +54,7 @@
<body>
<header>
<aside>July 28, 2022</aside>
<aside>July 29, 2022</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</header>
@ -231,7 +231,7 @@ Point(x=<span class="hljs-number">1</span>, y=<span class="hljs-number">2</span>
&lt;iter&gt; = chain.from_iterable(&lt;coll&gt;) <span class="hljs-comment"># Empties collections inside a collection in order.</span>
</code></pre>
<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>
&lt;iter&gt; = islice(&lt;coll&gt;, from_inclusive, …) <span class="hljs-comment"># `to_exclusive, +step_size`.</span>
&lt;iter&gt; = islice(&lt;coll&gt;, from_inclusive, …) <span class="hljs-comment"># `to_exclusive, +step_size`. Indices can be None.</span>
</code></pre>
<div><h2 id="generator"><a href="#generator" name="generator">#</a>Generator</h2><ul>
<li><strong>Any function that contains a yield statement returns a generator.</strong></li>
@ -2905,7 +2905,7 @@ $ pyinstaller script.py --add-data '&lt;path&gt;:.' <span class="hljs-comment">
<footer>
<aside>July 28, 2022</aside>
<aside>July 29, 2022</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</footer>

Loading…
Cancel
Save