Does Python really follow its philosophy of "Readability counts"?
kyrie at uh.cu
Tue Jan 20 05:39:16 CET 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
> > programmer go to the trouble of adding them manually, just to get one level
> > 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?
Facultad de Matemática y Computación, UH
More information about the Python-list