[Orbit-python-list] orbit-python and __setattr__ overloading
Status: Inactive
Brought to you by:
tack
From: Marcelo CB <co...@as...> - 2001-01-30 18:45:18
|
Hi, I noticed that when overloading __setattr__ for ORBit classes, I wont get the attributes handled by orbit-python, what means it handles the class __dict__ directly at server side, right ? I was wondering if this is an expected behaviour, mostly because I would like to overload __setattr__ to know when an attribute was changed. I need this to control the persistency state of the class. one workaround I can think of ( and I am actually using it ) is to implement myself methods to set each attribute (setAttrib1, setAttrib2, or set_attrib1, set__attrib2), and then take whatever action I would like before setting the attribute. I could also use a 'set' method, so I would do set('attrib','value'), but none of this would be as elegant as overloading __setattr__ and catching attribute changes transparently. Am I crazy, or blind, not to see a better option ? is it possible that orbit-python would set the attribites through __setattr__ the way I though so could overload it ? sorry for the long msg, and thanks. ------------------------------------------------------------------- Marcelo Corbani de Barros co...@as... Async Open Source Development - Brasil |