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碰巧一个定制那么能够以下方式获得一些属性