Browse Source

Splat operator

pull/188/head
Jure Šorn 11 months ago
parent
commit
93806fb862
2 changed files with 4 additions and 4 deletions
  1. 2
      README.md
  2. 6
      index.html

2
README.md

@ -739,7 +739,7 @@ def f(x, y, *, z): ... # f(x=1, y=2, z=3) | f(1, y=2, z=3) | f(1, 2, z=
<list> = [*<coll.> [, ...]] # Or: list(<collection>) [+ ...]
<tuple> = (*<coll.>, [...]) # Or: tuple(<collection>) [+ ...]
<set> = {*<coll.> [, ...]} # Or: set(<collection>) [| ...]
<dict> = {**<dict> [, ...]} # Or: dict(<dict>) [| ...] (since 3.9)
<dict> = {**<dict> [, ...]} # Or: <dict> | ... (since 3.9)
```
```python

6
index.html

@ -54,7 +54,7 @@
<body>
<header>
<aside>July 11, 2024</aside>
<aside>July 16, 2024</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</header>
@ -637,7 +637,7 @@ func(*args, **kwargs)
<div><h3 id="otheruses">Other Uses</h3><pre><code class="python language-python hljs">&lt;list&gt; = [*&lt;coll.&gt; [, ...]] <span class="hljs-comment"># Or: list(&lt;collection&gt;) [+ ...]</span>
&lt;tuple&gt; = (*&lt;coll.&gt;, [...]) <span class="hljs-comment"># Or: tuple(&lt;collection&gt;) [+ ...]</span>
&lt;set&gt; = {*&lt;coll.&gt; [, ...]} <span class="hljs-comment"># Or: set(&lt;collection&gt;) [| ...]</span>
&lt;dict&gt; = {**&lt;dict&gt; [, ...]} <span class="hljs-comment"># Or: dict(&lt;dict&gt;) [| ...] (since 3.9)</span>
&lt;dict&gt; = {**&lt;dict&gt; [, ...]} <span class="hljs-comment"># Or: &lt;dict&gt; | ... (since 3.9)</span>
</code></pre></div>
<pre><code class="python language-python hljs">head, *body, tail = &lt;coll.&gt; <span class="hljs-comment"># Head or tail can be omitted.</span>
@ -2932,7 +2932,7 @@ $ deactivate <span class="hljs-comment"># Deactivates the activ
<footer>
<aside>July 11, 2024</aside>
<aside>July 16, 2024</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</footer>

Loading…
Cancel
Save