Skip to content

Commit 618272b

Browse files
author
yuqiuwen
committed
doc
1 parent 483a09f commit 618272b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

blog/2022-12-14-python-notes/python notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ __bases__:类的所有父类构成元素
218218
>
219219
> [Python进阶灵魂拷问,元类是什么,它有什么用? - ludongguoa - 博客园 (cnblogs.com)](https://www.cnblogs.com/ludongguoa/p/15350348.html)
220220
221+
可以通过继承自type来定义一个元类,用于控制类的行为和属性,比如实例化时新增方法或属性
222+
221223
元类实例化 ——>自定义class ——>自定义类实例化 ——>实例
222224

223225

0 commit comments

Comments
 (0)