Re: Mixing custom __setattr__ method and properties in new style classes

2006-02-08 Thread Scott David Daniels
L.C. Rees wrote: > Can custom __setattr__ methods and properties be mixed in new style > classes? > > I experimented with a new style class with both a custom __setattr__ > method and a property. Attributes controlled by the __setattr__ method > work fine. When I attempt to set or get the property

Re: Mixing custom __setattr__ method and properties in new style classes

2006-02-08 Thread Fredrik Lundh
"L.C. Rees" wrote: > This is the code for the property at the end of the class definition: > > def _settext(self, txt): > self._tree.text = txt > > def _gettext(self, txt): > return self._tree.text > > def _deltext(self, txt): > self._tree.text = '' > > text

Re: Mixing custom __setattr__ method and properties in new style classes

2006-02-08 Thread L.C. Rees
I see the error: the get and set properties are inverted. Now it works. -- http://mail.python.org/mailman/listinfo/python-list