
On Nov 1, 2007, at 9:18 PM, Fred Drake wrote:
Thanks! Of all the proposals that have been presented, I still like that the best.
I've attached a quick hack of an implementation, just to play with it and see how it feels. Here's an example use: from property import property class Base(object): @property def attribute(self): print("Base.attribute (getter)") return 42 @property.get(attribute) def rwattribute(self): print("Base.rwattribute (getter)") return self.attribute * 2 @property.set(rwattribute) def rwattribute(self, value): print("Base.rwattribute (setter)") self.saved = value class Derived(Base): @property.get(Base.attribute) def roattribute(self): print("Derived.roattribute (getter)") return self.attribute / 2 -Fred -- Fred Drake <fdrake at acm.org>