sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.38k stars 469 forks source link

get rid of some range(0,*) in pyx files #33889

Closed fchapoton closed 2 years ago

fchapoton commented 2 years ago

We replace some range(0, a) by range(a), occasionally replacing xrange by range or a list by an iterator.

Component: refactoring

Author: Frédéric Chapoton

Branch/Commit: d2a9eb6

Reviewer: Samuel Lelièvre

Issue created by migration from https://trac.sagemath.org/ticket/33889

fchapoton commented 2 years ago

Commit: 3b88284

fchapoton commented 2 years ago

Branch: u/chapoton/33889

fchapoton commented 2 years ago

New commits:

3b88284get rid of some range(O,*)
slel commented 2 years ago
comment:2

J'approuve.

slel commented 2 years ago

Description changed:

--- 
+++ 
@@ -1 +1,4 @@
+We replace some `range(0, a)` by `range(a)`,
+occasionally replacing `xrange` by `range`
+or a list by an iterator.
vbraun commented 2 years ago
comment:3

Merge failure on top of:

7088517d31 Trac #33845: pep cleanup for multi_polynomial_ring_base.pyx

041f643967 Trac #33844: remove deprecation in matrix2

e47906b325 Trac #33843: remove deprecated has_key

36286c8e10 Trac #33837: sage.{numerical,calculus,probability}: Remove use of SAGE_TMP in doctests

028e704739 Trac #33801: sage.misc.sage_input: Remove import from sage.all

2649fa799b Trac #33764: suppress cache warnings from systemwide sympow on Fedora

8bcb5164a7 Trac #33749: set positions in butterfly digraph generator

3a99a8f974 Trac #33886: fixing a few roles

67d1d1df08 Trac #33884: use a smaller random test in edge_disjoint_spanning_trees

2f83c2e88e Trac #33864: Update cython to 0.29.30

517265e324 Trac #7989: Minpoly doesn't work for all matrices

7c5c452d36 Trac #33887: Fix map_reduce doctest, part 2

3666d4adee Trac #33792: documentation of save_session refers to the old sagenb

bbe8511d7d Trac #33762: fine tuning details in Tamari interval posets

4018507826 Trac #33742: add see also blocks in orientation methods

18b7c88d09 Trac #33732: get rid of unused variables in algebra

1753073dd3 Trac #33726: get rid of some iteritems

3202aea219 Trac #33721: better boolean statements

22de1a0203 Trac #33715: various code formatting details in pyx files in combinat

f0d36a069c Trac #33714: clean group_semidirect_product.py (pep8 and doc)

c775c27334 Trac #33712: adjust error messages in arith/

fd6379fa9e Trac #33696: simplify some isinstance

7a8aa66385 Trac #33690: some details in symbolic

cf7d8776f9 Trac #33669: pep cleanup for tableau_tuple

5d3168b747 Trac #33668: remove class inheritance of object in various places

6ef564d3cb Trac #33667: fix and activate pycodestyle E703 in pyx files

63db3114f3 Trac #33617: sage.modules.fg_pid.fgpmodule: Rename a test... function to test... (with deprecation)

b35733c36c Trac #33234: Fix randrange deprecation warning with python-3.10

3c6ce75e94 Trac #33124: Add pictures to point.py documentation

8c006115a1 Trac #33016: Fix global import of sage.repl.rich_output.display_manager.get_display_manager

8a631eb377 Trac #28598: Documentation error for Stein-Watkins database

f5c86b9df3 Trac #27522: implement Conway polynomial

98e21b8c89 Trac #25626: Add doctest for integrating exp(t)/(t + 1)^2 with giac

0039cce322 Trac #33867: tweak our .lgtm file, add documentation

7de926230c Trac #33858: Further parallelization for fundamental group of curves.

a357cf7e22 Trac #33847: Bug in h_star_vector for polytopes with the normaliz backend

f69c9b88ad Trac #33838: Refactoring run_autogen [to generate wrappers] to pkgs/sagemath-standard/setup.py

2bb3b14bc8 Trac #33831: deprecate unused PermutationGroup_generic.has_element

c4f35cfd83 Trac #33786: Top-level sage script: Unconditionally set SAGE_ROOT

83a89a096b Trac #33784: provide a framework for finite group actions

fa3b529c41 Trac #25833: Upgrade to MathJax 3 and configure Sage

e2ebf445d0 Trac #33825: Use pytest-xdist to run pytest in parallel

b4009625f3 Trac #33824: make gens and orbits of PermutationGroup immutable

af23627f18 Trac #33809: some pathlib in combinat and groups

955b5d994c Trac #33803: Fixes for the distributions sagemath-objects, sagemath-categories

3e6b41f7d6 Trac #33799: Replace SAGE_TMP in doctests of sage.misc.{persist,ostools}, sage.doctest, sage.repl

a3fd7185e3 Trac #33797: sage.misc.temporary_file: Remove use of SAGE_TMP

2ca053010a Trac #33794: modules/fp_graded/morphism.py test failure

7037fba482 Trac #33793: sage.misc.cython: Replace use of SPYX_TMP by a new cached function in sage.misc.temporary_file

d1152701c4 Trac #33787: Installation manual: Update section "system-wide install"

0ae55652cf Trac #33782: ci-cygwin: Update python version

833f53d1cc Trac #33779: Remove use of SAGE_TMP in sage.interfaces.latte

b376a8d71c Trac #33771: SSLContext needs an argument

df168c8112 Trac #33763: Refactor src/sage/docs

9597eafded Trac #33748: make accessing coefficients of finite-field elements easier

f02236f5b6 Trac #33744: Compute bases/circuits in MatroidUnion

8943dc07fc Trac #33743: Faster random tree generator

773ec37bec Trac #33740: Add conda dev environment

5e65c16108 Trac #33734: variety() for polynomial systems over ℚ using msolve

8e7dcca8d3 Trac #33733: allow to use flint for Stirling numbers

6f4efb0bf3 Updated SageMath version to 9.7.beta0

reviewer '' does not look right

fchapoton commented 2 years ago

Reviewer: Samuel Lelièvre

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 3b88284 to d2a9eb6

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

d2a9eb6Merge branch 'u/chapoton/33889' in 9.7.b1
fchapoton commented 2 years ago
comment:6

back to positive after trivial merge

vbraun commented 2 years ago

Changed branch from u/chapoton/33889 to d2a9eb6