Getters and setters in python, common practise
Petter Holmström
peholmst at abo.fi
Thu Apr 15 07:07:25 EDT 2004
Peter Hansen wrote:
>> Having a Delphi/Object Pascal-background, I'm very used to using
>> getters and setters when designing my classes. What is the common
>> practise in the Python world? Should one use them or not?
>
> Max described the common practice (don't use them until you actually
> need them) but forgot to mention that in recent versions of Python
> you can use "properties", in pretty much the same manner as Delphi
> uses them.
I have not found any documentation on this topic. Could you please point
me to some?
-Petter-
More information about the Python-list
mailing list