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 mutators - or just wrap them in a decorator. But I don't 
know if it's "simpler". And FWIW, it won't catch modifications of 
contained objects - only modifications of the list itself. So you'd also 
need to wrap contained objects in an object that would itself detect all 
changes and notify the container. Err... Looks like equality is the way 
to go.
</thinking-out-loud>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to