watching mutables?

Chris Liechti cliechti at
Fri Sep 27 13:24:53 EDT 2002

anton at (Anton Vredegoor) wrote in 
news:an211j$oi$1 at

> On Fri, 27 Sep 2002 09:34:55 -0500, "Mark McEahern"
> <marklists at> wrote:
>>l = Watched()
> Thanks for reacting to my question. However, I am looking for
> something that calls a defineable function if *any* mutable variable
> in the current scope changes. Variables should be 'marked' to install
> this function for them. For example 'watch(m,f)' indicates that
> function f is called if mutable variable m is changed. I do not want
> function f to be a method of object m since I want object m to be
> *any* mutable python object and furthermore I do not want to change
> the orginal object. The call of function f would be triggered by *any*
> change of object m. This would make debugging (and some other things I
> am tinkering with) a lot easier. Is it possible?

see EventObj:

Chris <cliechti at>

More information about the Python-list mailing list