global event listeners

Hunter Peress hunterp at gmail.com
Tue Nov 16 16:01:09 EST 2004


I want to do things directly before an object is changed. eg is there
something like:


a= "hi"

objectChangeListener(a,lambda(previous_value,new_value):\
global_counter.append(previous_value) ; return new_value)



so then this global_counter var will increment whenever a is changed.
PS: im not looking to hear "know your codebase better"




More information about the Python-list mailing list