Pythonのメタクラス
https://docs.python.org/ja/3/library/functions.html#type
3つの引数を受け取ったときのtype
type(name, bases, dict, **kwds)
With three arguments, return a new type object.
This is essentially a dynamic form of the class statement.
「これは本質的に、クラス文の動的な形式」
The name string is the class name and becomes the __name__ attribute.
「第1引数nameはクラスの名前」
「__name__属性となる」
The bases tuple contains the base classes and becomes the __bases__ attribute
「第2引数basesはタプルで、基底クラスを含む」
「__bases__属性となる」
The dict dictionary contains attribute and method definitions for the class body; it may be copied or wrapped before becoming the __dict__ attribute.
「第3引数dictは辞書で、クラスの本体となる属性とメソッドの定義を含む」
「__dict__属性となる前にコピーまたはラップされるかもしれない」
https://docs.python.org/ja/3/reference/datamodel.html#metaclasses
クラス定義が実行される際に、以下のステップが生じます:
TODO: ドキュメントの続きを参照
メタクラス(エキpy)