Dec-03-2018, 03:00 PM
(This post was last modified: Dec-03-2018, 03:01 PM by Gribouillis.)
Windspar Wrote:Is there an easier or better way to tackle this ?Why not use the
point
member as a private member and define x and y properties in MyObject
?class MyObject: @property def x(self): return self._point.x @x.setter def x(self, value): self._point.x = value self.update_point_total() ... b.x = 5 c.y += 3