From 8591e89bd9d3abc23241a0b81ebb67cfcf55de39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sat, 29 Mar 2025 12:40:37 +0100 Subject: [PATCH] Splat table --- README.md | 4 ++-- index.html | 4 ++-- parse.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1cba262..7fed961 100644 --- a/README.md +++ b/README.md @@ -719,8 +719,8 @@ func(1, 2, z=3) +--------------------+------------+--------------+----------------+------------------+ | | f(1, 2, 3) | f(1, 2, z=3) | f(1, y=2, z=3) | f(x=1, y=2, z=3) | +--------------------+------------+--------------+----------------+------------------+ -| f(x, *args, **kw): | yes | yes | yes | yes | -| f(*args, z, **kw): | | yes | yes | yes | +| f(x, *args, **kw): | yes | yes | yes | yes | +| f(*args, z, **kw): | | yes | yes | yes | | f(x, **kw): | | | yes | yes | | f(*, x, **kw): | | | | yes | +--------------------+------------+--------------+----------------+------------------+ diff --git a/index.html b/index.html index db30be2..6fa12a2 100644 --- a/index.html +++ b/index.html @@ -632,8 +632,8 @@ func(*args, **kwargs)

Allowed compositions of arguments inside function definition and the ways they can be called:

┏━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┓
 ┃                    │ f(1, 2, 3) │ f(1, 2, z=3) │ f(1, y=2, z=3) │ f(x=1, y=2, z=3) ┃
 ┠────────────────────┼────────────┼──────────────┼────────────────┼──────────────────┨
-┃ f(x, *args, **kw): │      ✓     │      ✓       │        ✓       │        ✓         ┃
-┃ f(*args, z, **kw): │            │      ✓       │        ✓       │        ✓         ┃
+┃ f(x, *args, **kw): │      ✓     │       ✓      │        ✓       │        ✓         ┃
+┃ f(*args, z, **kw): │            │       ✓      │        ✓       │        ✓         ┃
 ┃ f(x, **kw):        │            │              │        ✓       │        ✓         ┃
 ┃ f(*, x, **kw):     │            │              │                │        ✓         ┃
 ┗━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┛
diff --git a/parse.js b/parse.js
index aebd7e9..f238de4 100755
--- a/parse.js
+++ b/parse.js
@@ -430,8 +430,8 @@ const DIAGRAM_55_B =
   '┏━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┓\n' +
   '┃                    │ f(1, 2, 3) │ f(1, 2, z=3) │ f(1, y=2, z=3) │ f(x=1, y=2, z=3) ┃\n' +
   '┠────────────────────┼────────────┼──────────────┼────────────────┼──────────────────┨\n' +
-  '┃ f(x, *args, **kw): │      ✓     │      ✓       │        ✓       │        ✓         ┃\n' +
-  '┃ f(*args, z, **kw): │            │      ✓       │        ✓       │        ✓         ┃\n' +
+  '┃ f(x, *args, **kw): │      ✓     │       ✓      │        ✓       │        ✓         ┃\n' +
+  '┃ f(*args, z, **kw): │            │       ✓      │        ✓       │        ✓         ┃\n' +
   '┃ f(x, **kw):        │            │              │        ✓       │        ✓         ┃\n' +
   '┃ f(*, x, **kw):     │            │              │                │        ✓         ┃\n' +
   '┗━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┛\n';