Filip Gruszczyński wrote: >>>>> class Element(object): >> operations = "Element operations" >> >> >>>>> class Group(object): >> operations = "Group operations" >> >> >>>>> e = Element() >>>>> g = Group() >>>>> >>>>> e.operations >> 'Element operations' >>>>> g.operations >> 'Group operations' > > But this is the same as asking for a class, except for having to write > a method giving some form of a class name and then basing on this > classname display operations. I know this solution, but this is what I > would like to evade. >
It is *not* the same - the code that knows about the operations is not in the treeview-logic anymore, but local to the class that can actually deal with the operations. Diez -- http://mail.python.org/mailman/listinfo/python-list