>>> class A: ... def __init__(self): ... self.t = 4 ... self.p = self._get_p() ... def _get_p(self): ... return self.t ... >>> a = A() >>> a.p 4 >>> a.t += 7 >>> a.p 4 I would like to have it that when I ask for p, method _get_p is always called so that attribute can be updated. How can I have this functionality here? thanks