'Returns True if self and other are the same mathematical entities'

def equals(self, other):

    if (not isinstance(other, Line)):
        return False
    return Point.is_collinear(self.p1, other.p1, self.p2, other.p2)
