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 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
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
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