I have a metaclass:
class MyMeta(type):
def __init__(cls, name, bases, dct):
# Do something
...
return super(MyMeta, cls).__init__(cls, name, bases, dct)
and a class:
class MyClass(object):
__metaclass__ = MyMeta
When I use these I get the following error:
TypeError: Error when calling the metaclass bases
type.__init__() takes 1 or 3 arguments
What's the problem, and why does type.__init__()
take a exactly variable number of arguments?