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 just for you :-) If Peter's solution is "good enough" for you, then great, go ahead and use it. But beware: of the two implementations I know, you cannot have both: - access from instances; - read-only property; You can have access from instances, but then the classproperty is not read-only. Or you can have read-only access, but only from the class object. Although I haven't studied Eryksun's solution yet, he may have found a work-around. Good luck! -- Steve _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor