Ben Finney wrote:
> Not using the built-in property type. Here is a recipe for a
> LateBindingProperty that does what you ask:
>
> Steven Bethard:
> "This recipe provides a LateBindingProperty callable which allows
> the getter and setter methods associated with the property to be
>
On Thu, 18 Aug 2005 23:36:58 +0200, Torsten Bronger <[EMAIL PROTECTED]> wrote:
>Hallöchen!
>
>When I use properties in new style classes, I usually pass get/set
>methods to property(), like this:
>
>x = property(get_x)
>
>If I overwrite get_x in a derived class, any access to x still calls
>t
Torsten Bronger <[EMAIL PROTECTED]> wrote:
> Hallöchen!
>
> When I use properties in new style classes, I usually pass get/set
> methods to property(), like this:
>
> x = property(get_x)
Better is to make it clear that 'get_x' is not intended to be called
directly. You can do this through th
I don't think so - the reason is that property() is evaluated
in the baseclass, and stores a callable, not a name. the only thing you
could do is either
- create a level of indirection, using lambda, to force the lookup:
x = property(lamda self: self.get_x())
- use a metaclass, that tries to
I don't think so - the reason is that property() is evaluated
in the baseclass, and stores a callable, not a name. the only thing you
could do is either
- create a level of indirection, using lambda, to force the lookup:
x = property(lamda self: self.get_x())
- use a metaclass, that tries to