#!/usr/bin/python from mytraits import Trait, TraitUser class T1(Trait): def coin(self): print "coin" def meuh(self): self.coin() class T2(Trait): def coin(self): print "plop" class T3(Trait): __uses__ = T1, T2 def coin(self): print "coin T3" class A(TraitUser): __uses__ = T1.alias({"coin2" : "coin"}), if __name__ == "__main__": # when run as a script a = A() a.coin() a.meuh() #a.T3Coin()