class Foo(type): def __init__(cls): print 'class defined!' class Bar(object): __metaclasss__ = Foo