question on properties

Gonçalo Rodrigues op73418 at mail.telepac.pt
Wed Jun 26 14:06:13 EDT 2002


On Wed, 26 Jun 2002 17:04:32 +0100, Gonçalo Rodrigues
<op73418 at mail.telepac.pt> wrote:

>Hi,
>
>Suppose in a class Klass I have a property prop. Suppose also that I
>have
>
>class AnotherKlass(Klass):
>    ...
>
>I can override property prop in AnotherKlass by just redefining it, but
>what if I want to acess the base class prop how do I do it?
>
>TIA and all the best,
>Gonçalo Rodrigues

Got it! Use (for getting):

Klass.prop.__get__(self)

All the best,
Gonçalo Rodrigues



More information about the Python-list mailing list