Next / Previous / Contents / Shipman's homepage

7.10. Pt.__add__(): Add two points

homcoord.py
# - - -   P t . _ _ a d d _ _

    def __add__(self, other):
        '''Add two points.
        '''
        return Pt(self.x()+other.x(), self.y()+other.y())