On Sat, Feb 24, 2007 at 09:59:16PM +0100, Philipp von Weitershausen wrote: > Jeff Shell wrote: > >With `readproperty`, you can still have the simple > >getter-method-wrapper property, with the ability to replace the value > >on instances. So no, the builtin 'property' descriptor is not fine. > >`property` came into being when Python got descriptors, but before it > >got decorators. By grand design or divine accident, > > Clearly Guido's time machine is to blame here :) > > >the fact that the > >first argument for `property` is the getter function makes it a useful > >decorator. But it wasn't written with decorators in mind. It was > >written for ``x = property(getX, setX, delX)``, or some combination > >thereof. > > I once mused about this and came up with rwproperty (a decorator > spelling for getters *and* setters, del'ers)
rwproperty is incredibly cool. I'd love to see it in the Python standard library. Marius Gedminas -- This is an object-oriented system. If we change anything, the users object.
signature.asc
Description: Digital signature
_______________________________________________ Zope3-dev mailing list [email protected] Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
