Re: [Python-Dev] Definining properties - a use case for classdecorators?

2005-10-19 Thread Guido van Rossum
On 10/19/05, Fredrik Lundh [EMAIL PROTECTED] wrote: letting class inject a slightly magic self variable into the class namespace ? class C: foo = property(self.getFoo, self.setFoo, None, 'the foo property') def getFoo(self): return self._foo def

Re: [Python-Dev] Definining properties - a use case for classdecorators?

2005-10-16 Thread Delaney, Timothy (Tim)
Guido van Rossum wrote: To which Tim Delaney responded, have a look at my response here: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/408713 I looked at that, and now I believe it's actually *better* to mention the property name twice, at least compared to Tim' s approach. I