I have a SuperClass which defines a property and it's setter, like so:
class A(object):
    def __init__(self):
        self._mode = None
    @property
    def mode(self):
        # to be overriden in subclass to implement the actual getter code
        raise NotImplementedError
    @mode.setter
    def mode(self, value):
        # common assertions and input validations
        self._set_mode(value)
    def _set_mode(self, value):
        # to be overriden in subclass to implement the actual setter code
        raise NotImplementedError
class B(A):
    @property
    def mode(self):
        return self._mode
    def _set_mode(self, value):
        self._mode = value
obj = B()
obj.mode = 'test'
Which raises
obj.mode = 'test'
AttributeError: can't set attribute
It would seem that I have to register a setter in B. I'd usually do this like @A.mode.setter, but that doesn't quite apply here as I don't actually want to define a new setter in B, just re-use the one from A.
Does anyone have a hint on how to solve this? Might be trivial, but I'm not seeing it right now :/