Browse Source

Metaprograming

pull/45/head
Jure Šorn 5 years ago
parent
commit
823f7f6798
2 changed files with 4 additions and 4 deletions
  1. 4
      README.md
  2. 4
      index.html

4
README.md

@ -1541,7 +1541,7 @@ class MyClass(metaclass=MyMetaClass):
('abcde', 12345) ('abcde', 12345)
``` ```
#### Type diagram ('abc' is a str, str is a type, ...):
#### Type diagram (str is an instance of type, ...):
```text ```text
+---------+-------------+ +---------+-------------+
| classes | metaclasses | | classes | metaclasses |
@ -1554,7 +1554,7 @@ class MyClass(metaclass=MyMetaClass):
+---------+-------------+ +---------+-------------+
``` ```
#### Inheritance diagram (str inherits from object, ...):
#### Inheritance diagram (str is a subclass of object, ...):
```text ```text
+---------+-------------+ +---------+-------------+
| classes | metaclasses | | classes | metaclasses |

4
index.html

@ -1264,7 +1264,7 @@ param_names = list(<sig>.parameters.keys())
<pre><code class="python language-python hljs"><span class="hljs-meta">&gt;&gt;&gt; </span>MyClass.a, MyClass.b <pre><code class="python language-python hljs"><span class="hljs-meta">&gt;&gt;&gt; </span>MyClass.a, MyClass.b
(<span class="hljs-string">'abcde'</span>, <span class="hljs-number">12345</span>) (<span class="hljs-string">'abcde'</span>, <span class="hljs-number">12345</span>)
</code></pre> </code></pre>
<h4 id="typediagramabcisastrstrisatype">Type diagram ('abc' is a str, str is a type, …):</h4>
<h4 id="typediagramstrisaninstanceoftype">Type diagram (str is an instance of type, …):</h4>
<pre><code class="text language-text">┏━━━━━━━━━┯━━━━━━━━━━━━━┓ <pre><code class="text language-text">┏━━━━━━━━━┯━━━━━━━━━━━━━┓
┃ classes │ metaclasses ┃ ┃ classes │ metaclasses ┃
┠─────────┼─────────────┨ ┠─────────┼─────────────┨
@ -1275,7 +1275,7 @@ param_names = list(&lt;sig&gt;.parameters.keys())
┃ str ───────╯ ┃ ┃ str ───────╯ ┃
┗━━━━━━━━━┷━━━━━━━━━━━━━┛ ┗━━━━━━━━━┷━━━━━━━━━━━━━┛
</code></pre> </code></pre>
<h4 id="inheritancediagramstrinheritsfromobject">Inheritance diagram (str inherits from object, …):</h4>
<h4 id="inheritancediagramstrisasubclassofobject">Inheritance diagram (str is a subclass of object, …):</h4>
<pre><code class="text language-text">┏━━━━━━━━━┯━━━━━━━━━━━━━┓ <pre><code class="text language-text">┏━━━━━━━━━┯━━━━━━━━━━━━━┓
┃ classes │ metaclasses ┃ ┃ classes │ metaclasses ┃
┠─────────┼─────────────┨ ┠─────────┼─────────────┨

Loading…
Cancel
Save