def test_metaclass_call_override():
 class mytype(type, ):
  def __call__(self, *args):
   return args
 class myclass(object, ):
  __metaclass__ = mytype
 AreEqual(myclass(1, 2, 3), (1, 2, 3))

def test_metaclass_call_override ( ) : class mytype ( type , ) : def __call__ ( self , * args ) : return args class myclass ( object , ) : __metaclass__ = mytype AreEqual ( myclass ( 1 , 2 , 3 ) , ( 1 , 2 , 3 ) )
overriding __call__ on a metaclass should work .