J
jm.suresh
In the following code, I could not find out why the set and get methods
are not called once I set the property.
.... def __init__(self):
.... self._color = 12
.... def _setcolor(self,value):
.... print 'setting'
.... self._color = value
.... def _getcolor(self):
.... print 'getting'
.... return self._color
.... color = property(_getcolor,_setcolor)
....
For some reason the set method is not getting called at all, Anybody
has any clue?
thanks.
are not called once I set the property.
.... def __init__(self):
.... self._color = 12
.... def _setcolor(self,value):
.... print 'setting'
.... self._color = value
.... def _getcolor(self):
.... print 'getting'
.... return self._color
.... color = property(_getcolor,_setcolor)
....
22getting
12
For some reason the set method is not getting called at all, Anybody
has any clue?
thanks.