import ch.psi.pshell.core.Nameable as Nameable class Test(Nameable): def doSomething(self): self.setCache("VALUE", -1) a= Test() print a.name