Browse Source

Splat table

main
Jure Šorn 2 weeks ago
parent
commit
8591e89bd9
3 changed files with 6 additions and 6 deletions
  1. 4
      README.md
  2. 4
      index.html
  3. 4
      parse.js

4
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 |
+--------------------+------------+--------------+----------------+------------------+

4
index.html

@ -632,8 +632,8 @@ func(*args, **kwargs)
<div><h4 id="allowedcompositionsofargumentsinsidefunctiondefinitionandthewaystheycanbecalled">Allowed compositions of arguments inside function definition and the ways they can be called:</h4><pre><code class="text language-text">┏━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┓
┃ │ f(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>) │ f(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, z=<span class="hljs-number">3</span>) │ f(<span class="hljs-number">1</span>, y=<span class="hljs-number">2</span>, z=<span class="hljs-number">3</span>) │ f(x=<span class="hljs-number">1</span>, y=<span class="hljs-number">2</span>, z=<span class="hljs-number">3</span>) ┃
┠────────────────────┼────────────┼──────────────┼────────────────┼──────────────────┨
<span class="hljs-title">f</span>(x, *args, **kw): │ ✓ │ │ ✓ │ ✓ ┃
<span class="hljs-title">f</span>(*args, z, **kw): │ │ │ ✓ │ ✓ ┃
<span class="hljs-title">f</span>(x, *args, **kw): │ ✓ │ │ ✓ │ ✓ ┃
<span class="hljs-title">f</span>(*args, z, **kw): │ │ │ ✓ │ ✓ ┃
<span class="hljs-title">f</span>(x, **kw): │ │ │ ✓ │ ✓ ┃
<span class="hljs-title">f</span>(*, x, **kw): │ │ │ │ ✓ ┃
┗━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┛

4
parse.js

@ -430,8 +430,8 @@ const DIAGRAM_55_B =
'┏━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┓\n' +
'┃ │ f(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>) │ f(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, z=<span class="hljs-number">3</span>) │ f(<span class="hljs-number">1</span>, y=<span class="hljs-number">2</span>, z=<span class="hljs-number">3</span>) │ f(x=<span class="hljs-number">1</span>, y=<span class="hljs-number">2</span>, z=<span class="hljs-number">3</span>) ┃\n' +
'┠────────────────────┼────────────┼──────────────┼────────────────┼──────────────────┨\n' +
'┃ <span class="hljs-title">f</span>(x, *args, **kw): │ ✓ │ │ ✓ │ ✓ ┃\n' +
'┃ <span class="hljs-title">f</span>(*args, z, **kw): │ │ │ ✓ │ ✓ ┃\n' +
'┃ <span class="hljs-title">f</span>(x, *args, **kw): │ ✓ │ │ ✓ │ ✓ ┃\n' +
'┃ <span class="hljs-title">f</span>(*args, z, **kw): │ │ │ ✓ │ ✓ ┃\n' +
'┃ <span class="hljs-title">f</span>(x, **kw): │ │ │ ✓ │ ✓ ┃\n' +
'┃ <span class="hljs-title">f</span>(*, x, **kw): │ │ │ │ ✓ ┃\n' +
'┗━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┛\n';

Loading…
Cancel
Save