oop - Python overriding getter without setter -
class human(object): def __init__(self, name=''): self.name = name @property def name(self): return self._name @name.setter def name(self, value): self._name = value class superhuman(human): @property def name(self): return 'super ' + name s = superhuman('john') print s.name # doesn't work :( "attributeerror: can't set attribute" s.name = 'jack' print s.name i want able override property able use super parent's setter without having override setter in child class. is pythonicaly possible? use just .getter decorator of original property: class superhuman(human): @human.name.getter def name(self): return 'super ' + self._name note have use full name reach original property descriptor on parent class. demonstration: >>> class superhuman(human): ... @human.name.getter ... def name(self): ... return...