def degrees(f):
        if not f:
            return (-oo,)*f.ring.ngens
        else:
            return tuple(map(max, list(zip(*f.itermonoms()))))
A tuple containing leading degrees in all variables.
dataset/ETHPy150Open sympy/sympy/sympy/polys/rings.py/PolyElement.degrees