Re: Creating properties with decorator like syntax

2005-02-17 Thread Will McGugan
Will McGugan wrote: 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

Creating properties with decorator like syntax

2005-02-17 Thread Will McGugan
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