Re: [Tutor] classproperty: readonly and inheritance - not more needed

2017-04-24 Thread Thomas Güttler
Now the "not read-only" part: Foo.my_prop = "whatever" Foo.my_prop 'whatever' You now have a string attribute, the property is lost. Methods behave the same way and it's generally not a problem, but you should at least be aware of this behaviour. Yes, now I understand you. Thank you

Re: [Tutor] classproperty: readonly and inheritance - not more needed

2017-04-23 Thread Peter Otten
Thomas Güttler wrote: > > > Am 20.04.2017 um 14:26 schrieb Steven D'Aprano: >> On Thu, Apr 20, 2017 at 10:39:57AM +0200, Thomas Güttler wrote: >> - its hard to get classproperty to work right. >>> >>> What is "righ"? >>> >>> In my case a read-only classproperty is enough. Inheritance

Re: [Tutor] classproperty: readonly and inheritance - not more needed

2017-04-23 Thread Thomas Güttler
Am 20.04.2017 um 14:26 schrieb Steven D'Aprano: On Thu, Apr 20, 2017 at 10:39:57AM +0200, Thomas Güttler wrote: - its hard to get classproperty to work right. What is "righ"? In my case a read-only classproperty is enough. Inheritance should be supported. I don't have a usecase for a

Re: [Tutor] classproperty: readonly and inheritance - not more needed

2017-04-20 Thread Steven D'Aprano
On Thu, Apr 20, 2017 at 10:39:57AM +0200, Thomas Güttler wrote: > >- its hard to get classproperty to work right. > > What is "righ"? > > In my case a read-only classproperty is enough. Inheritance should be > supported. > > I don't have a usecase for a setter. The standard library is not

[Tutor] classproperty: readonly and inheritance - not more needed

2017-04-20 Thread Thomas Güttler
Am 19.04.2017 um 11:16 schrieb Steven D'Aprano: On Wed, Apr 19, 2017 at 09:28:26AM +0200, Thomas Güttler wrote: [code for a classproperty] Nice, if it is that simple. Is there a reason why this is not in the standard library? I haven't had a chance to test Peter's classproperty code yet,