Accessors in Python (getters and setters)

Bruno Desthuilliers onurb at xiludom.gro
Thu Jul 13 05:06:30 EDT 2006


Marc 'BlackJack' Rintsch wrote:
> In <1152778446.236509.151730 at 35g2000cwc.googlegroups.com>, mystilleef
> wrote:
> 
> 
>>Maric Michaud wrote:
>>
(snip)
>>>But they are in Python and that is the python's philosophy. All attribute or
>>>method not beginning with an '_' *is* API.
>>
>>Right, and what if I want to change a private API to a public one. How
>>does that solve my naming issues.
> 
> 
> Then you have to change all references to that private attribute. 

Not even - cf my answer on this point.


-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list