subclassing list question

manstey manstey at csu.edu.au
Sun May 20 20:49:12 EDT 2007


Hi,

I have a simple class that subclasses a list:

class CaListOfObj(list):
    """ subclass of list """
    def __init__(self, *args, **kwargs):
        list.__init__(self, *args, **kwargs)

a= CaListOfObj([1,2,3])

Is it possible to have a method in the class that is called EVERY time
a is modified?

Thanks




More information about the Python-list mailing list