Someone correct me if i'm wrong but this can be solved easily with a reaaaal simple descriptor so for example:
class KeepSync(object):
def __init__(self, default):
self.value = default
def __get__(self, instance, owner):
return self.value
def __set__(self, instance, value):
self.value = value
class Foo(object):
bar = KeepSync(0)
class C1(Foo):
pass
class C2(Foo):
pass
f = C1()
g = C2()
print "f.bar is %s\ng.bar is %s" % (f.bar, g.bar)
print "Setting f.bar to 10"
f.bar = 10
print "f.bar is %s\ng.bar is %s" % (f.bar, g.bar) # YAY BOTH ARE 10 !
Any object that inherits KeepSync descriptor will always return that value, i'm not sure if I helped but, that's how I understood the problem, you wouldn't even need a base class but you can