From 93806fb862919be405c0145c7f409b88a524b068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= <sornjure@gmail.com> Date: Tue, 16 Jul 2024 16:27:32 +0200 Subject: [PATCH] Splat operator --- README.md | 2 +- index.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3421806..c30ec02 100644 --- a/README.md +++ b/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 diff --git a/index.html b/index.html index ed7f7ad..95854cf 100644 --- a/index.html +++ b/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"><list> = [*<coll.> [, ...]] <span class="hljs-comment"># Or: list(<collection>) [+ ...]</span> <tuple> = (*<coll.>, [...]) <span class="hljs-comment"># Or: tuple(<collection>) [+ ...]</span> <set> = {*<coll.> [, ...]} <span class="hljs-comment"># Or: set(<collection>) [| ...]</span> -<dict> = {**<dict> [, ...]} <span class="hljs-comment"># Or: dict(<dict>) [| ...] (since 3.9)</span> +<dict> = {**<dict> [, ...]} <span class="hljs-comment"># Or: <dict> | ... (since 3.9)</span> </code></pre></div> <pre><code class="python language-python hljs">head, *body, tail = <coll.> <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>