Next / Previous / Contents / Shipman's homepage

7.11. Pt.__sub__(): Subtract two points

homcoord.py
# - - -   P t . _ _ s u b _ _

    def __sub__(self, other):
        '''Subtract two points.
        '''
        return Pt(self.x()-other.x(), self.y()-other.y())