Stephan Richter wrote:
>>class Foo(Persistent):
>> implements(IFooB)
>>
>> def setBar(self, bar):
>> ....
>>
>> def getBar(self):
>> ....
>>
>> bar = property(getBar, setBar)
>
>
> The disadvantage here, of course, is that the {g,s}etBar methods hang around
> in the class for no reason. Benji's example avoided this.
Benji's example is also beyond any magic of most of the people.
*Especially* when you're just new to Python.
When I first saw constructs like this (using @apply), I was immediately
repelled and came up with this:
http://codespeak.net/svn/user/philikon/rwproperty/. There I also explain
the problems I see with the @apply approach in more detail.
Philipp
_______________________________________________
Zope3-dev mailing list
[email protected]
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com