Hi to all, i am trying to use properties in Python and i am sure i have made something wrong with the below code but i just cannot see what it is.
Can anyone please help me on this ? The code is : class Person(object): age = 0 @property def age(): def fget(self): return self.age def fset(self, value): self.age = value me = Person() me.age = "34" print me.age and i am getting the error: " File "C:\projects\Python\p2.py", line 12, in <module> me.age = "34" AttributeError: can't set attribute " What exactly i am doing wrong ?? Thanks a lot in advance. -- http://mail.python.org/mailman/listinfo/python-list