Good Form

Gregor Horvath gh at gregor-horvath.com
Sat Oct 21 04:36:00 EDT 2006


phez.asap at gmail.com schrieb:

> Would you normally write methods to retrive and set your class
> variables or just refrence them directly?
> 

you start by referencing them directly and ONLY if you need you can add
getters and setters later on without breaking any client code.
see the property function.

An explanation for the motivation behind this and python's thinking can
be found here:

http://tinyurl.com/wfgyw

-- 
  Servus, Gregor



More information about the Python-list mailing list