Re: rwproperty (was Re: [Zope3-dev] Re: zope.cachedescriptors outdated)
On Feb 28, 2007, at 9:10 PM, Philipp von Weitershausen wrote: I didn't realize rwproperty was so popular. I've been wanting to put it on the Cheeseshop since I found out about its popularity. It's like you're reading my mind :). http://cheeseshop.python.org/ pypi/rwproperty Awesome, thanks! :-) Gary ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: rwproperty (was Re: [Zope3-dev] Re: zope.cachedescriptors outdated)
On 28 Feb 2007, at 20:57 , Gary Poster wrote: On Feb 24, 2007, at 3:59 PM, Philipp von Weitershausen wrote: [...] 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. I wish you put this in PyPI as an egg. :-) I have the module trailing around in various of my packages... Next time I am about to deposit another copy, if you haven't made an egg by then perhaps I'll do it. ;-) Any objections, if I beat you to it? I didn't realize rwproperty was so popular. I've been wanting to put it on the Cheeseshop since I found out about its popularity. It's like you're reading my mind :). http://cheeseshop.python.org/pypi/ rwproperty ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
rwproperty (was Re: [Zope3-dev] Re: zope.cachedescriptors outdated)
On Feb 24, 2007, at 3:59 PM, Philipp von Weitershausen wrote: [...] 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. I wish you put this in PyPI as an egg. :-) I have the module trailing around in various of my packages... Next time I am about to deposit another copy, if you haven't made an egg by then perhaps I'll do it. ;-) Any objections, if I beat you to it? Gary ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Re: zope.cachedescriptors outdated
Philipp von Weitershausen wrote: I once mused about this and came up with rwproperty Which is quite nice. -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Re: zope.cachedescriptors outdated
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 Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] Re: zope.cachedescriptors outdated
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 ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com