def getDist(self, other): ox, oy = other.getCoords() xDist = self.x - ox yDist = self.y - oy return math.sqrt(xDist**2+yDist**2)