metaclasses

metaclasses

 英

  • 網絡元類;五分鐘理解元類;元數據類

例句

For instance, it took us a few months to understand how to use metaclasses, but a few years to understand how not to use them.

例如幾個時間理解如何使用但是幾年時間才能明白如何使用它們

We explain the concept of composition of metaclasses.

我們解釋合成概念

Of course, the guilt of the authors is obvious here: our earlier installments on metaclasses in Python helped popularize their usage.

當然作者過錯明顯我們關于Python部分助長這種做法流行

Each of these metaclasses has attributes from which Class inherits.

這些Class繼承屬性

The metaclasses being extended by the stereotype are specified on the Extensions tab in the Properties view.

原型擴展屬性視圖Extensions完成

When you select multiple metaclasses, a generic features window opens where you can change the stereotype.

選擇多個一個通用特性窗口變更模板地方打開

Notice that metaclasses were never mentioned in the lookup procedure.

注意從未查找過程提到

A profile defines a number of stereotype classes that can extend one or more UML metaclasses with additional properties and relationships.

規范定義許多能夠通過添加屬性關系擴展一個或者更多UML模板

You feel that a custom metaclasses is overkill for the simple job of class initialization, and you would rather use a simpler solution.

覺得對于初始簡單工作使用定義殺雞用牛刀所以想要使用一種更為簡單解決方案

Just this is the main difference between metaclasses and superclasses.

正是主要不同

For metaclasses in Python specifically, Guido van Rossum's essay, Unifying types and classes in Python 2. 2 is useful.

特別是對于PythonGuidovanRossum文章UnifyingtypesandclassesinPython2.2有用

Metaclasses are more fragile than many people realize.

類比很多認識更加脆弱

Stereotype S1 has two attributes (a1: Integer, and a2 : Boolean), extends Class and Actor metaclasses, and has constraint profileCons1.

StereotypeS1兩個屬性(a1:以及a2:布爾),擴展動作并且存在約束profileCons1。

I have some ideas for doing some tricky stuff with metaclasses in future library versions, and I might even work in properties and slots.

對于未來版本幾個技巧方面想法而且甚至可能使用特性插槽

Metaclasses defined in the UML 2. 1 metamodel (through metaclass association)

元類定義UML2.1模型通過關聯

If the Duke class should happen to have a custom metaclasses, it can obtain some attributes that way

如果Duke碰巧一個定制那么能夠以下方式獲得一些屬性