def __eq__(p1, p2):
        if not p2:
            return not p1
        elif isinstance(p2, p1.ring.dtype):
            return dict.__eq__(p1, p2)
        elif len(p1) > 1:
            return False
        else:
            return p1.get(p1.ring.zero_monom) == p2
Equality test for polynomials.
dataset/ETHPy150Open sympy/sympy/sympy/polys/rings.py/PolyElement.__eq__