class Point(): """An implementation of points that converts coordinates to ints.""" def __init__(self, x, y): self.x = x self.y = y def setx(self, x): try: self._x = int(x) except Exception: raise Exception("Cannot convert " + repr(x) + " to an integer") def getx(self): return self._x def sety(self, y): try: self._y = int(y) except Exception: raise Exception("Cannot convert " + repr(y) + " to an integer") def gety(self): return self._y x = property(getx, setx) y = property(gety, sety)