[Zope3-dev] Re: zope.cachedescriptors outdated
Philipp von Weitershausen
philipp at weitershausen.de
Sat Feb 24 15:59:16 EST 2007
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) and classproperty (uses
nested class statement):
http://www.z3lab.org/sections/blogs/philipp-weitershausen/2006_05_29_pycon-06-lightning-talk
if anyone cares.
Anyway, sorry for the off-topicness... back to business :)
--
http://worldcookery.com -- Professional Zope documentation and training
Next Zope 3 training at Camp5: http://trizpug.org/boot-camp/camp5
More information about the Zope3-dev
mailing list