Browse Source

Iterator

pull/41/head
Jure Šorn 5 years ago
parent
commit
74427684c4
2 changed files with 2 additions and 2 deletions
  1. 2
      README.md
  2. 2
      index.html

2
README.md

@ -187,7 +187,7 @@ for i, el in enumerate(<collection> [, i_start]):
Iterator Iterator
-------- --------
```python ```python
<iter> = iter(<collection>) # Calling `iter(<iter>)` returns unmodified iterator.
<iter> = iter(<collection>) # `iter(<iter>)` returns unmodified iterator.
<iter> = iter(<function>, to_exclusive) # Sequence of return values until 'to_exclusive'. <iter> = iter(<function>, to_exclusive) # Sequence of return values until 'to_exclusive'.
<el> = next(<iter> [, default]) # Raises StopIteration or returns 'default' on end. <el> = next(<iter> [, default]) # Raises StopIteration or returns 'default' on end.
``` ```

2
index.html

@ -337,7 +337,7 @@ to_exclusive = &lt;range&gt;.stop
... ...
</code></pre></div> </code></pre></div>
<div><h2 id="iterator"><a href="#iterator" name="iterator">#</a>Iterator</h2><pre><code class="python language-python hljs">&lt;iter&gt; = iter(&lt;collection&gt;) <span class="hljs-comment"># Calling `iter(&lt;iter&gt;)` returns unmodified iterator.</span>
<div><h2 id="iterator"><a href="#iterator" name="iterator">#</a>Iterator</h2><pre><code class="python language-python hljs">&lt;iter&gt; = iter(&lt;collection&gt;) <span class="hljs-comment"># `iter(&lt;iter&gt;)` returns unmodified iterator.</span>
&lt;iter&gt; = iter(&lt;function&gt;, to_exclusive) <span class="hljs-comment"># Sequence of return values until 'to_exclusive'.</span> &lt;iter&gt; = iter(&lt;function&gt;, to_exclusive) <span class="hljs-comment"># Sequence of return values until 'to_exclusive'.</span>
&lt;el&gt; = next(&lt;iter&gt; [, default]) <span class="hljs-comment"># Raises StopIteration or returns 'default' on end.</span> &lt;el&gt; = next(&lt;iter&gt; [, default]) <span class="hljs-comment"># Raises StopIteration or returns 'default' on end.</span>
</code></pre></div> </code></pre></div>

Loading…
Cancel
Save