Re: Problem with Property

2006-02-25 Thread none
Steve Holden wrote: > "none <"@bag.python.org wrote: > It seems particularly odd to want to put getters and setters behind > property access. What does the extra layer buy you? The purpose is that there is more to the accessors then I posted. The setters do some 'mark dirty' bookeeping whenever

Re: Problem with Property

2006-02-25 Thread Peter Hansen
"none <"@bag.python.org wrote: > I'm trying to implement a simple repeateable property mechansism so I > don't have to write accessors for every single instance variable I have. ... > Any ideas? Yes, don't write accessors for every single instance variable you have. In some languages that mig

Re: Problem with Property

2006-02-25 Thread Felipe Almeida Lessa
Em Sáb, 2006-02-25 às 09:14 -0500, Steve Holden escreveu: > It seems particularly odd to want to put getters and setters behind > property access. What does the extra layer buy you? I can only think of some kind of debugging. Maybe? > regards > Steve Cya, Felipe. -- "Quem excele em empregar

Re: Problem with Property

2006-02-25 Thread none
André Malo wrote: > * none wrote: > > >>classMyObject: > > [...] > > >>As you can see, the _getProperty() method gets called properly when I do >> 'o.value' but 'o.value = 123' does not seem to use the property >>stucture. I can't figure out why 'o.value=123' does not call >>_setProperty()

Re: Problem with Property

2006-02-25 Thread none
André Malo wrote: > * none wrote: > > >>classMyObject: > > [...] > > >>As you can see, the _getProperty() method gets called properly when I do >> 'o.value' but 'o.value = 123' does not seem to use the property >>stucture. I can't figure out why 'o.value=123' does not call >>_setProperty()

Re: Problem with Property

2006-02-25 Thread Steve Holden
"none <"@bag.python.org wrote: > I'm trying to implement a simple repeateable property mechansism so I > don't have to write accessors for every single instance variable I have. Please don't do that. The Python way is to use direct access to instance variables unless there's a good reason not to

Re: Problem with Property

2006-02-25 Thread André Malo
* none wrote: > classMyObject: [...] > As you can see, the _getProperty() method gets called properly when I do > 'o.value' but 'o.value = 123' does not seem to use the property > stucture. I can't figure out why 'o.value=123' does not call > _setProperty() > > Any ideas? property only wor