Hi list:
I have googled quite a bit on this matter and I can't seem to find what
I need (I think Im just looking where I'm not suppose to :). I'm
working with code that is not of my authorship and there is a class
attribute that is changes by directly referencing it (object.attr =
value) instead of using a getter/setter (object.setAttr(Value) )
function. The thing is that I have no idea when the change occurs and I
would REALLY like to find out.
So here comes my question .....
Is there a function construct inside a python class that is
automatically called when an attr is changed????
Like for example
/class Class:
def __init__();
self.attr = "whatever"
def __attrChangeFunction__():
print "It has changed"
obj = Class()
obj.attr = "other whatever"
*Output:*
It has changed
/
Thanks for the help.
Regards/
/