Re: how to detect change of list of instances

2007-03-14 Thread Bruno Desthuilliers
manstey a écrit : Thanks. All I want to know is whether the newlist, as a list of instances, is modified. I thought equality was the way to go, but is there a simpler way? How can I monitor the state of newlist and set a flag if it is changed in anyway? thinking-out-loud Override the

how to detect change of list of instances

2007-03-13 Thread manstey
how do I detect a change in a list of class instances? from copy import deepcopy class CaListOfObj(list): subclass of list def __init__(self, *args, **kwargs): list.__init__(self, *args, **kwargs) class CaClass(object): pass class CaData(object): pass

Re: how to detect change of list of instances

2007-03-13 Thread Steven D'Aprano
On Tue, 13 Mar 2007 18:23:24 -0700, manstey wrote: how do I detect a change in a list of class instances? from copy import deepcopy class CaListOfObj(list): subclass of list def __init__(self, *args, **kwargs): list.__init__(self, *args, **kwargs) class

Re: how to detect change of list of instances

2007-03-13 Thread manstey
Thanks. All I want to know is whether the newlist, as a list of instances, is modified. I thought equality was the way to go, but is there a simpler way? How can I monitor the state of newlist and set a flag if it is changed in anyway? -- http://mail.python.org/mailman/listinfo/python-list