Does Python really follow its philosophy of "Readability counts"?

Luis Zarrabeitia kyrie at uh.cu
Mon Jan 19 23:39:16 EST 2009


Quoting "Russ P." <Russ.Paielli at gmail.com>:

> On Jan 19, 5:09 pm, Luis Zarrabeitia <ky... at uh.cu> wrote:
> 
> > Russ, I think _you_ are missing the point.
> > If the attribute is already public, why does it need properties? Why would
> a
> > programmer go to the trouble of adding them manually, just to get one level
> of
> > indirection for an already public attribute?
> 
> You don't understand the purpose of properties -- and you tell me that
> *I* am the one missing the point?

This line would make a lot more sense if you were talking about Java's getters
and setters, or about a language where accessing a property is different than
accessing an attribute (which would make little sense). If properties already
let you change from attribute to method without affecting the caller, why do you
need a property that does nothing?

-- 
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie




More information about the Python-list mailing list