You can do it like this:
class DoubleExample(Example):
@Example.value.getter
def value(self):
return self.v * 2
o = Example()
o.value = 1
print o.value
p = DoubleExample()
p.value = 1
print p.value
However, this only works if it Exampleis a new style class ( class Example(object):), and not an old style class ( class Example:), as in your code example.
Warning. Thomas pointed out in the comments that this method may not meet expectations if you use multiple inheritance ( class Foo(Bar, Baz)).
source
share