Properties vs. get/set-methods
Michael 'Mickey' Lauer
mickey at tm.informatik.uni-frankfurt.de
Fri Aug 23 02:08:05 CEST 2002
Aahz <aahz at pythoncraft.com> wrote:
> In article <3d64b8fa at nntp.server.uni-frankfurt.de>,
> Michael 'Mickey' Lauer <mickey at tm.informatik.uni-frankfurt.de> wrote:
>>So far I guess this would have a performance drawback and a loss
>>of clarity here just in favour of having the possibility to do
>>instance.attribute = value instead of instance.setAttribute(value).
>>Seems to me that this really is not the scenario properties were
>>invented for!? What am I missing here?
> You're missing that it's exactly the scenario properties are for. ;-)
Hmm.. ok. Then I guess it really shows its benefit if the values are
calculated in real-time and saving state is either not needed or
saved implicitly (or explicitly) somewhere else.
More information about the Python-list