Hi,

Is there any way of making properties using a decorator? The current way of creating a property seems inelegant.

Something like this imaginary snippit would be nice, IMHO.

class C(object):
        @make_property
        def x(self):
            def getx(self): return self.__x
            def setx(self, value): self.__x = value
            def delx(self): del self.__x

Regards,

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

Reply via email to