Browse Source

Iterator

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

2
README.md

@ -179,7 +179,7 @@ Point(x=1, y=2)
Iterator
--------
```python
<iter> = iter(<collection>)
<iter> = iter(<collection>) # Calling `iter(<iter>)` returns unmodified iterator.
<iter> = iter(<function>, to_exclusive) # Sequence of return values until 'to_exclusive'.
<el> = next(<iter> [, default]) # Raises StopIteration or returns 'default' on end.
```

2
index.html

@ -320,7 +320,7 @@ Point(x=<span class="hljs-number">1</span>, y=<span class="hljs-number">2</span>
(<span class="hljs-string">'x'</span>, <span class="hljs-string">'y'</span>)
</code></pre>
<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;)
<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>
&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>
</code></pre>

Loading…
Cancel
Save