On Mar 9, 2006, at 7:20 PM, Philipp von Weitershausen wrote:
http://codespeak.net/svn/user/philikon/rwproperty/
This is nice. I'm going to use it right now. I wish it were
available directly in Zope 3 (or that we were fully eggified).
Gary
___
On 3/9/06, Stephan Richter <[EMAIL PROTECTED]> wrote:
> 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.
That's only a disadvantage if you don't want to allow a subclass to
use them; that can be useful at times
Philipp von Weitershausen wrote:
Benji's example is also beyond any magic of most of the people.
I don't know about that.
*Especially* when you're just new to Python.
There I'll agree with you.
http://codespeak.net/svn/user/philikon/rwproperty/.
I like this type of approach better, but
Lennart Regebro wrote:
On 3/10/06, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote:
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/.
Yeah, that´s much better and is how I would have
On 3/10/06, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote:
> 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/.
Yeah, that´s much better and is how I would have expected it to be
done
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
On Thursday 09 March 2006 06:09, Marko Mikulicic 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
On 09.03.2006., at 11:43, Sam Stainsby wrote:
On Thu, 09 Mar 2006 04:29:12 -0500, Benji York wrote:
class Foo(Persistent):
implements(IFooB)
@apply
def bar(self):
doc = """The bar attribute"""
def fset(self, bar):
if bar is None:
On Thu, 09 Mar 2006 04:29:12 -0500, Benji York wrote:
> class Foo(Persistent):
> implements(IFooB)
>
> @apply
> def bar(self):
> doc = """The bar attribute"""
>
> def fset(self, bar):
> if bar is None:
> self._bar = 47
>