(f, p, K)
return gf_trunc(h, p)
Create a ``GF(p)[x]`` polynomial from a dict.

    Examples
    ========

    >>> from sympy.polys.domains import ZZ
    >>> from sympy.polys.galoistools import gf_from_dict

    >>> gf_from_dict({10: ZZ(4), 4: ZZ(33), 0: ZZ(-1)}, 5, ZZ)
    [4, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4]
Create a ``GF(p)[x]`` polynomial from a dict.
Create a GF ( p ) [ x ] polynomial from a dict .
def gf_from_dict(f, p, K):
    """
    Create a ``GF(p)[x]`` polynomial from a dict.

    Examples
    ========

    >>> from sympy.polys.domains import ZZ
    >>> from sympy.polys.galoistools import gf_from_dict

    >>> gf_from_dict({10: ZZ(4), 4: ZZ(33), 0: ZZ(-1)}, 5, ZZ)
    [4, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4]

    """
    n, h = max(f.keys()), []

    if isinstance(n, SYMPY_INTS):
        for k in xrange(n, -1, -1):
            h.append(f.get(k, K.zero) % p)
    else:
        (n,) = n

        for k in xrange(n, -1, -1):
            h.append(f.get((k,), K.zero) % p)

    return gf_trunc(h, p)
def gf_from_dict ( f , p , K ) : n , h = max ( f . keys ( ) ) , [ ] if isinstance ( n , SYMPY_INTS ) : for k in xrange ( n , - 1 , - 1 ) : h . append ( f . get ( k , K . zero ) % p ) else : ( n , ) = n for k in xrange ( n , - 1 , - 1 ) : h . append ( f . get ( ( k , ) , K . zero ) % p ) return gf_trunc ( h , p )