Browse Source

Splat operator

pull/53/merge
Jure Šorn 1 month ago
parent
commit
2c32601e15
2 changed files with 10 additions and 10 deletions
  1. 8
      README.md
  2. 12
      index.html

8
README.md

@ -728,10 +728,10 @@ func(1, 2, z=3)
### Other Uses
```python
<list> = [*<collection> [, ...]] # Or: list(<collection>) [+ ...]
<tuple> = (*<collection>, [...]) # Or: tuple(<collection>) [+ ...]
<set> = {*<collection> [, ...]} # Or: set(<collection>) [| ...]
<dict> = {**<dict> [, ...]} # Or: <dict> | ...
<list> = [*<collection> [, ...]] # Or: list(<coll>) [+ ...]
<tuple> = (*<collection>, [...]) # Or: tuple(<coll>) [+ ...]
<set> = {*<collection> [, ...]} # Or: set(<coll>) [| ...]
<dict> = {**<dict>, ...} # Or: <dict> | ...
```
```python

12
index.html

@ -56,7 +56,7 @@
<body>
<header>
<aside>March 25, 2025</aside>
<aside>March 27, 2025</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</header>
@ -639,10 +639,10 @@ func(*args, **kwargs)
┗━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┛
</code></pre></div>
<div><h3 id="otheruses">Other Uses</h3><pre><code class="python language-python hljs">&lt;list&gt; = [*&lt;collection&gt; [, ...]] <span class="hljs-comment"># Or: list(&lt;collection&gt;) [+ ...]</span>
&lt;tuple&gt; = (*&lt;collection&gt;, [...]) <span class="hljs-comment"># Or: tuple(&lt;collection&gt;) [+ ...]</span>
&lt;set&gt; = {*&lt;collection&gt; [, ...]} <span class="hljs-comment"># Or: set(&lt;collection&gt;) [| ...]</span>
&lt;dict&gt; = {**&lt;dict&gt; [, ...]} <span class="hljs-comment"># Or: &lt;dict&gt; | ...</span>
<div><h3 id="otheruses">Other Uses</h3><pre><code class="python language-python hljs">&lt;list&gt; = [*&lt;collection&gt; [, ...]] <span class="hljs-comment"># Or: list(&lt;coll&gt;) [+ ...]</span>
&lt;tuple&gt; = (*&lt;collection&gt;, [...]) <span class="hljs-comment"># Or: tuple(&lt;coll&gt;) [+ ...]</span>
&lt;set&gt; = {*&lt;collection&gt; [, ...]} <span class="hljs-comment"># Or: set(&lt;coll&gt;) [| ...]</span>
&lt;dict&gt; = {**&lt;dict&gt;, ...} <span class="hljs-comment"># Or: &lt;dict&gt; | ...</span>
</code></pre></div>
<pre><code class="python language-python hljs">head, *body, tail = &lt;collection&gt; <span class="hljs-comment"># Head or tail can be omitted.</span>
@ -2944,7 +2944,7 @@ $ deactivate <span class="hljs-comment"># Deactivates the active
<footer>
<aside>March 25, 2025</aside>
<aside>March 27, 2025</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</footer>

|||||||
100:0
Loading…
Cancel
Save