I recently wanted to do the same kind of thing. See this tread:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/f27c3b7950424e1c
for details on how to do it.
--
http://mail.python.org/mailman/listinfo/python-list
Paul - thank you very much for your help, it was much appreciated. I
thought that this was the kind of thing I had to do.
I also messed around with properties to try and solve this problem,
but noticed a similar thing (ie, that changing a mutable attribute's
element is different to rebinding it):
On Jun 13, 12:00 pm, "Alan J. Salmoni" <[EMAIL PROTECTED]> wrote:
> My question is how can my program be notified of a change to a class
> attribute that is a list?
You can't. But you can replace lists inside your class with a list
that notifies changes.
Something like this:
class NotifyingList(
Hello everyone,
I searched through groups to find an appropriate answer to this one
but could only find these which didn't meet my program's needs:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/53a0bfddeedf35b2/5e4b7119afa5f8df?lnk=gst&q=monitor+change+in+mutable#5e4b7119afa