(f, x=None)
The leading degree in ``x`` or the main variable.

        Note that the degree of 0 is negative infinity (the SymPy object -oo).
The leading degree in ``x`` or the main variable.
The leading degree in x or the main variable .
def degree(f, x=None):
        """
        The leading degree in ``x`` or the main variable.

        Note that the degree of 0 is negative infinity (the SymPy object -oo).

        """
        i = f.ring.index(x)

        if not f:
            return -oo
        else:
            return max([ monom[i] for monom in f.itermonoms() ])
def degree ( f , x = None ) : i = f . ring . index ( x ) if not f : return - oo else : return max ( [ monom [ i ] for monom in f . itermonoms ( ) ] )