On Jan 19, 6:24 pm, Steven D'Aprano <ste...@remove.this.cybersource.com.au> wrote: > On Mon, 19 Jan 2009 18:07:50 -0800, Russ P. wrote: > > On Jan 19, 5:09 pm, Luis Zarrabeitia <ky...@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? > > Well, I *thought* I did, and (unlike Bruno) I'm not hostile to the idea > Russ is proposing. But I must admit it's not clear to me why Russ thinks > it is a good idea to automatically turn this: > > class Parrot(object): > def __init__(self): > self.x = 1 > > into this: > > class Parrot(object): > def __init__(self): > self._x = 1 > def getx(self): > return self._x > def setx(self, value): > self._x = value > x = property(getx, setx) > > Because frankly, that's how I read Russ' explanation for what Scala is > doing. Have I missed something? > > -- > Steven
-- http://mail.python.org/mailman/listinfo/python-list