(self, other)
Return True if the other polynomial is the same as
        this.
Return True if the other polynomial is the same as
        this.
Return True if the other polynomial is the same as this .
def __eq__(self, other) -> bool:
        """
        Return True if the other polynomial is the same as
        this.
        """
        if isinstance(other, int) or isinstance(other, float) or isinstance(other, Fraction):
            other_poly = Polynomial([Monomial({}, other)])
            return self.__eq__(other_poly)
        elif isinstance(other, Monomial):
            return self.__eq__(Polynomial([other]))
        elif isinstance(other, Polynomial):
            return self.all_monomials() == other.all_monomials()
        else:
            raise ValueError('Can only compare a polynomial with an int, float, Fraction, Monomial, or another Polynomial.')
def __eq__ ( self , other ) -> bool : if isinstance ( other , int ) or isinstance ( other , float ) or isinstance ( other , Fraction ) : other_poly = Polynomial ( [ Monomial ( { } , other ) ] ) return self . __eq__ ( other_poly ) elif isinstance ( other , Monomial ) : return self . __eq__ ( Polynomial ( [ other ] ) ) elif isinstance ( other , Polynomial ) : return self . all_monomials ( ) == other . all_monomials ( ) else : raise ValueError ( 'Can only compare a polynomial with an int, float, Fraction, Monomial, or another Polynomial.' )