File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1725,7 +1725,6 @@ class MyClass(metaclass=MyMetaClass):
1725
1725
``` python
1726
1726
type (MyClass) == MyMetaClass # MyClass is an instance of MyMetaClass.
1727
1727
type (MyMetaClass) == type # MyMetaClass is an instance of type.
1728
- type (type ) == type # Type is an instance of type.
1729
1728
```
1730
1729
1731
1730
``` text
@@ -1742,8 +1741,8 @@ type(type) == type # Type is an instance of type.
1742
1741
1743
1742
### Inheritance Diagram
1744
1743
``` python
1745
- MyClass.__base__ == object # MyClass is a subclass of object.
1746
- object .__base__ == None # Object is a subclass to no one .
1744
+ MyClass.__base__ == object # MyClass is a subclass of object.
1745
+ MyMetaClass .__base__ == type # MyMetaClass is a subclass of type .
1747
1746
```
1748
1747
1749
1748
``` text
Original file line number Diff line number Diff line change @@ -1469,7 +1469,6 @@ <h3 id="metaclassattribute">Metaclass Attribute</h3>
1469
1469
< h3 id ="typediagram "> Type Diagram</ h3 >
1470
1470
< pre > < code class ="python language-python hljs "> type(MyClass) == MyMetaClass < span class ="hljs-comment "> # MyClass is an instance of MyMetaClass.</ span >
1471
1471
type(MyMetaClass) == type < span class ="hljs-comment "> # MyMetaClass is an instance of type.</ span >
1472
- type(type) == type < span class ="hljs-comment "> # Type is an instance of type.</ span >
1473
1472
</ code > </ pre >
1474
1473
< pre > < code class ="text language-text "> ┏━━━━━━━━━┯━━━━━━━━━━━━━┓
1475
1474
┃ Classes │ Metaclasses ┃
@@ -1482,8 +1481,8 @@ <h3 id="typediagram">Type Diagram</h3>
1482
1481
┗━━━━━━━━━┷━━━━━━━━━━━━━┛
1483
1482
</ code > </ pre >
1484
1483
< h3 id ="inheritancediagram "> Inheritance Diagram</ h3 >
1485
- < pre > < code class ="python language-python hljs "> MyClass.__base__ == object < span class ="hljs-comment "> # MyClass is a subclass of object.</ span >
1486
- object .__base__ == < span class =" hljs-keyword " > None </ span > < span class ="hljs-comment "> # Object is a subclass to no one .</ span >
1484
+ < pre > < code class ="python language-python hljs "> MyClass.__base__ == object < span class ="hljs-comment "> # MyClass is a subclass of object.</ span >
1485
+ MyMetaClass .__base__ == type < span class ="hljs-comment "> # MyMetaClass is a subclass of type .</ span >
1487
1486
</ code > </ pre >
1488
1487
< pre > < code class ="text language-text "> ┏━━━━━━━━━┯━━━━━━━━━━━━━┓
1489
1488
┃ Classes │ Metaclasses ┃
You can’t perform that action at this time.
0 commit comments