Property error

king kikapu aboudouvas at panafonet.gr
Fri Dec 15 06:14:27 EST 2006


Your example Dennis, work as expected. I understand the mistake i have
made. But when i try to fix the original code usihn @property now, it
gives me the same error.
So, here it 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


I am sure it is something very obvious but my skills does not (yet)
enable me to figure this out,,,




More information about the Python-list mailing list