def METHOD_NAME(name):
    def fget(self):
        return getattr(self, name)
    def fset(self, value):
        setattr(self, name, value)
        if self.on_update is not None:
            self.on_update(self)
    return property(fget, fset)