'Returns a list of degrees of ``f``.
Examples
>>> from sympy import Poly
>>> from sympy.abc import x, y
>>> Poly(x**2 + y*x + 1, x, y).degree_list()
(2, 1)'

def degree_list(f):

    if hasattr(f.rep, 'degree_list'):
        return f.rep.degree_list()
    else:
        raise OperationNotSupported(f, 'degree_list')
