On Feb 26, 9:56 am, Christian Heimes <li...@cheimes.de> wrote: > Dan Barbus schrieb: > > > Hi, > > > I have a problem with setting a property to a class instance, in > > python 2.5.1. The property is defined through get and set methods, but > > when I set it, the setter doesn't get called. Instead, I believe the > > property in the instance gets replaced with a new object (string). > > > I have the following code (stripped down from my program): > > > class Model(): > > def __init__(self, title = ''): > > self._views, self._title = [], None > > self.setTitle(title) > > *snip* > > Properties don't work correctly on old style classes. You have to > subclass from object in order to get a new style class. > > class Model(object): > pass > > Christian
Thanks, that solved the problem. -- http://mail.python.org/mailman/listinfo/python-list