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 -- http://mail.python.org/mailman/listinfo/python-list