In order to set metaclass of a class, we use the __metaclass__
attribute. Metaclasses are used at the time the class is defined, so setting it explicitly after
I am unable to test this out right now (I don't have access to Python in my machine right now :-(), but unless metaclass is imutable, perhaps you can try something like this:
>>> class B:
pass
>>> setattr(B, "__metaclass__", MetaClass)
Again, I can't test it right now so I apologize if this is an invalid answer, just trying to help. :)