'Returns all terms from a ``f``.'

def all_terms(f):

    if (not f.lev):
        n = dup_degree(f.rep)
        if (n < 0):
            return [((0,), f.dom.zero)]
        else:
            return [(((n - i),), c) for (i, c) in enumerate(f.rep)]
    else:
        raise PolynomialError('multivariate    polynomials    not    supported')
