override a property

Kay Schluehr kay.schluehr at gmx.net
Thu Oct 20 05:02:05 EDT 2005


Robin Becker wrote:

> I thought that methods were always overridable.
> In this case the lookup on the
> class changes the behaviour of the one and only property.

How can something be made overridable that is actually overridable? I
didn't know how to better express the broken polymorphism of Pythons
properties than by stating it as a pleonasm about the used get and set
methods. This way a property don't ever have to be redefined in
subclasses if get_x, set_x etc. are changed. 

Kay




More information about the Python-list mailing list