The problem is that when upgrading from python 2.5 to python 2.6 type.__init__()it was changed so that you no longer have to go through cls. So just call the call super:
return super(MyMeta, cls).__init__(name, bases, dct)
Another solution is to avoid the call superas a whole and do it (although this is a little less nice):
return type.__init__(cls, name, bases, dct)
And everything will work fine (in python> = 2.6).
, type.__init__() , . , , , type(myobject) myobject:
>>> number = 1
>>> type(number)
<type 'int'>
>>> type('my string')
<type 'str'>
. Python? .