Nagy László Zsolt wrote: > >> Yes, I believe it does. (Others may disagree. This is a design >> question and very much a matter of style, not hard fact.) I would have >> an explicit action "set_content" which will set the value of an input >> field, the inner text of a textarea, the checked state of a check box, >> etc. > In other words, you would use simple getter and setter methods instead > of properties. It is the simplest solution. (And I believe, it is > non-pythonic, but that is just an opinion.) > > I would like to hear other opinions.
Disregarding potential implementation obstacles I think it would be clean and clear if you could access a property foo in a base class with super().foo and set it with super().foo = value It looks like the get part already works: >>> class A: ... @property ... def foo(self): return "foo" ... >>> class B(A): ... @property ... def foo(self): return super().foo.upper() ... >>> A().foo 'foo' >>> B().foo 'FOO' -- https://mail.python.org/mailman/listinfo/python-list