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"