I want to ask what the with_metaclass()
call means in the definition of a class.
E.g.:
class Foo(with_metaclass(Cls1, Cls2)):
UPDATE: the six.with_metaclass()
function has since been patched with a decorator variant, i.e. @six.add_metaclass()
. This update fixes some mro issues related to the base objects. The new decorator would be applied as follows:
import six
@six.add_metaclass(Meta)
class MyClass(Base):
pass
Here are the patch notes and here is a similar, detailed example and explanation for using a decorator alternative.