#!/usr/local/bin/python2 class M(type): def __new__(*args): print 1 type.__new__(*args) class A: __metaclass__ = M class B(A): pass