On 8/12/05, Damir Hakimov <[EMAIL PROTECTED]> wrote: > #!/usr/bin/python2.4 > class test_property: > def __init__(self): > self._x="Zero" > pass > def setx(self,x): > print "set x" #this is not work > self._x=x > def getx(self): return self._x > def delx(self): del(self._x) > x=property(getx,setx,delx,"XXX") > t=test_property() > t.x=1 > print t.x
Properties only work with new style classes, so try: class test_property(object): -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list