@@ -296,18 +296,18 @@ cdef class pAdicZZpXElement(pAdicExtElement):
296296 # print(printer)
297297
298298 if self .prime_pow.e == 1 :
299- for j from 0 <= j < self .prime_pow.prec_cap:
299+ for j in range ( self .prime_pow.prec_cap) :
300300 ans.append([])
301- for i from 0 <= i < self .prime_pow.deg:
301+ for i in range ( self .prime_pow.deg) :
302302 ZZ_coeff.x = ZZ_p_rep(ZZ_pX_coeff(shifter, i))
303303 ZZ_to_mpz(coeff.value, & ZZ_coeff.x)
304304 L = printer.base_p_list(coeff, pos)
305- for j from 0 <= j < prec:
305+ for j in range ( prec) :
306306 if j < len (L):
307307 ans[j].append(L[j])
308308 else :
309309 ans[j].append(zero)
310- for j from 0 <= j < prec:
310+ for j in range ( prec) :
311311 while ans[j]:
312312 if ans[j][- 1 ] == 0 :
313313 ans[j].pop()
@@ -322,7 +322,7 @@ cdef class pAdicZZpXElement(pAdicExtElement):
322322 # It's important that one doesn't normalize in between shifting (for capped relative elements):
323323 # _const_term doesn't normalize and thus we pick up the zeros
324324 # since we're throwing away leading zeros, it doesn't matter if we start normalized or not.
325- for j from 0 <= j < self .prime_pow.e:
325+ for j in range ( self .prime_pow.e) :
326326 list_elt = PY_NEW(Integer)
327327 if i + j == prec:
328328 break
@@ -655,7 +655,7 @@ cdef preprocess_list(pAdicZZpXElement elt, L):
655655 pshift_z = ntl_ZZ.__new__ (ntl_ZZ)
656656 pshift_z.x = elt.prime_pow.pow_ZZ_tmp(- mpz_get_si((< Integer> min_val).value))[0 ]
657657 pshift_m = elt.prime_pow.pow_Integer(- mpz_get_si((< Integer> min_val).value))
658- for i from 0 <= i < len (L):
658+ for i in range ( len (L) ):
659659 if isinstance (L[i], ntl_ZZ):
660660 L[i] = ntl_ZZ_p(L[i]* pshift_z, ctx)
661661 elif isinstance (L[i], (Integer, Rational, int )):
@@ -670,7 +670,7 @@ cdef preprocess_list(pAdicZZpXElement elt, L):
670670 pshift_z = ntl_ZZ.__new__ (ntl_ZZ)
671671 pshift_z.x = elt.prime_pow.pow_ZZ_tmp(mpz_get_ui((< Integer> min_val).value))[0 ]
672672 pshift_m = elt.prime_pow.pow_Integer(mpz_get_ui((< Integer> min_val).value))
673- for i from 0 <= i < len (L):
673+ for i in range ( len (L) ):
674674 if isinstance (L[i], ntl_ZZ):
675675 ZZ_div(tmp, (< ntl_ZZ> L[i]).x, pshift_z.x)
676676 py_tmp = ntl_ZZ.__new__ (ntl_ZZ)
@@ -688,7 +688,7 @@ cdef preprocess_list(pAdicZZpXElement elt, L):
688688 py_tmp.x = tmp
689689 L[i] = ntl_ZZ_p(py_tmp, ctx)
690690 else :
691- for i from 0 <= i < len (L):
691+ for i in range ( len (L) ):
692692 if isinstance (L[i], (ntl_ZZ, Integer, Rational, int )):
693693 L[i] = ntl_ZZ_p(L[i], ctx)
694694 elif (isinstance (L[i], pAdicGenericElement) and L[i]._is_base_elt(elt.prime_pow.prime)) or isinstance (L[i], IntegerMod_abstract) or (L[i].modulus_context() is not ctx):
@@ -754,7 +754,7 @@ cdef find_val_aprec(PowComputer_ext pp, L):
754754 min_val = big
755755 min_aprec = big
756756 total_type = two # we begin by defaulting to the list elements being integers
757- for i from 0 <= i < len (L):
757+ for i in range ( len (L) ):
758758 cur_val, cur_aprec, cur_type = get_val_prec(pp, L[i])
759759 # return "a","b","c"
760760 # proc_type == 0 indicates something with finite precision
0 commit comments