class person(object):
    def _get_age(self):
        return self.__age
    age = property(_get_age) # a read-only property

    def _get_name(self):
        return self.__name
    def _set_name(self, value):
        self.__name = value
    name = property(_get_name, _set_name)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to