are you sure that you need to connect it to the class and not the object?
\r
then, how to do this as a @classmethod and not a method.
and not to copy the line, you can create a attribute in the meta class:
\rMetaComp class(type): def __init__(cls,name,bases,kwargs): super(MetaComp, cls).__init__(name,bases,kwargs) cls.connects = [] # for each class, and heir to the bude your class Comp(object): __metaclass__ = MetaComp @classmethod def connect(cls,obj): cls.connects.append(obj) class Comp1(Comp): pass class Comp2(Comp): pass # each call adds to its connects: Comp.connect('foo') Comp1.connect('foo1') Comp2.connect('foo2')