Skip to content

Commit 2c32601

Browse files
committed
Splat operator
1 parent ec71062 commit 2c32601

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -728,10 +728,10 @@ func(1, 2, z=3)
728728

729729
### Other Uses
730730
```python
731-
<list> = [*<collection> [, ...]] # Or: list(<collection>) [+ ...]
732-
<tuple> = (*<collection>, [...]) # Or: tuple(<collection>) [+ ...]
733-
<set> = {*<collection> [, ...]} # Or: set(<collection>) [| ...]
734-
<dict> = {**<dict> [, ...]} # Or: <dict> | ...
731+
<list> = [*<collection> [, ...]] # Or: list(<coll>) [+ ...]
732+
<tuple> = (*<collection>, [...]) # Or: tuple(<coll>) [+ ...]
733+
<set> = {*<collection> [, ...]} # Or: set(<coll>) [| ...]
734+
<dict> = {**<dict>, ...} # Or: <dict> | ...
735735
```
736736

737737
```python

index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
<body>
5858
<header>
59-
<aside>March 25, 2025</aside>
59+
<aside>March 27, 2025</aside>
6060
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
6161
</header>
6262

@@ -639,10 +639,10 @@
639639
┗━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┛
640640
</code></pre></div>
641641

642-
<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>
643-
&lt;tuple&gt; = (*&lt;collection&gt;, [...]) <span class="hljs-comment"># Or: tuple(&lt;collection&gt;) [+ ...]</span>
644-
&lt;set&gt; = {*&lt;collection&gt; [, ...]} <span class="hljs-comment"># Or: set(&lt;collection&gt;) [| ...]</span>
645-
&lt;dict&gt; = {**&lt;dict&gt; [, ...]} <span class="hljs-comment"># Or: &lt;dict&gt; | ...</span>
642+
<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>
643+
&lt;tuple&gt; = (*&lt;collection&gt;, [...]) <span class="hljs-comment"># Or: tuple(&lt;coll&gt;) [+ ...]</span>
644+
&lt;set&gt; = {*&lt;collection&gt; [, ...]} <span class="hljs-comment"># Or: set(&lt;coll&gt;) [| ...]</span>
645+
&lt;dict&gt; = {**&lt;dict&gt;, ...} <span class="hljs-comment"># Or: &lt;dict&gt; | ...</span>
646646
</code></pre></div>
647647

648648
<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 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
29442944

29452945

29462946
<footer>
2947-
<aside>March 25, 2025</aside>
2947+
<aside>March 27, 2025</aside>
29482948
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
29492949
</footer>
29502950

0 commit comments

Comments
 (0)