def smul(self, a, b):
    ' Return a*b where a or b is scalar\n        '
    if (not isinstance(b, FieldElem)):
        A = a.poly.coef
        Pc = ([0] * len(A))
        for i in range(len(Pc)):
            Pc[i] = (A[i] * gmpy.mpz(b))
        return ExtensionFieldElem(self, polynom(self.F, Pc))
    else:
        return self.smul(b, a)
Return a*b where a or b is scalar
def smul(self, a, b):
    ' \n        '
    if (not isinstance(b, FieldElem)):
        A = a.poly.coef
        Pc = ([0] * len(A))
        for i in range(len(Pc)):
            Pc[i] = (A[i] * gmpy.mpz(b))
        return ExtensionFieldElem(self, polynom(self.F, Pc))
    else:
        return self.smul(b, a)