Abstract class (irrelevant blethering)

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Mon Sep 15 14:10:04 CEST 2008

Stephen Horne a écrit :
> For example, to me the term "property" is basically a trivial design
> pattern or an object-oriented principle. I don't really see the need
> for the language feature. I can define getter and setter methods all
> by myself, and I don't really see the benefit of disguising them as
> member variables.

The canonical use case for computed attributes is that they let you turn 
a plain attribute into a computed one if/when the need arises, without 
breaking client code *nor* having to force all access attributes thru 
getters/setters righ from the start "just in case".

More information about the Python-list mailing list