def _coeffs_generator(n):
 for coeffs in variations([1, (-1)], n, repetition=True):
  (yield list(coeffs))

def _coeffs_generator ( n ) : for coeffs in variations ( [ 1 , ( - 1 ) ] , n , repetition = True ) : ( yield list ( coeffs ) )
generate coefficients for primitive_element() .