Getters and setters in python, common practise

Aahz aahz at pythoncraft.com
Sat Apr 17 19:50:19 EDT 2004


In article <BbudnV_BesJW5OPdRVn-ig at powergate.ca>,
Peter Hansen  <peter at engcorp.com> wrote:
>Yermat wrote:
>> Petter Holmström wrote:
>>>
>>> I have not found any documentation on this topic. Could you please 
>>> point me to some?
>> 
>> see "property" at http://www.python.org/doc/2.3.3/lib/built-in-funcs.html
>> 
>> You could also look at 
>> http://users.rcn.com/python/download/Descriptor.htm to understand how it 
>> does really work.
>
>Also helpful: http://www.python.org/2.2/descrintro.html#property

Even more helpful: http://www.python.org/doc/newstyle.html

(From "Documentation" | "New-style classes")
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"I used to have a .sig but I found it impossible to please everyone..."  --SFJ



More information about the Python-list mailing list