def __eq__(self, other):
        '''
        x == y

        Returns true if x.head == y.head and y.tail.isCollinear(x.head,x.tail)
        '''
        return (self.head == other.head) and other.tail.isCollinear(
            self.head, self.tail)
def __eq__ ( self , other ) : return ( self . head == other . head ) and other . tail . isCollinear ( self . head , self . tail )
x == y

        Returns true if x.head == y.head and y.tail.isCollinear(x.head,x.tail)