def distance(self, other): """Compute the distance from this Point to another Point.""" assert isinstance(other, Point) x1, y1 = self x2, y2 = other return math.hypot(x2 - x1, y2 - y1)