Python 类型方法和 Maya 变换节点上的类型函数有什么区别?

What is the difference between the Python type method and the type function on a Maya Transform Node?

标题中的问题

示例代码:

>>> j.type()
u'joint'
>>> type(j)
<class 'pymel.core.nodetypes.Joint'>

看看这个简单的例子。您正在尝试比较两个不同的东西 - Joint class 方法 type 和 python 内置函数 type - 它们具有相同的名称,所有:

class Joint():
    def type(self):
        return u'joint'

>>> j = Joint()
>>> j.type()
'joint'
>>> type(j)
<class '__main__.Joint'>