[Numpy-svn] [numpy/numpy] 91aa03: 2to3: Replace xrange by range and use list(range(....

GitHub noreply@github....
Thu Mar 28 09:10:09 CDT 2013


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 91aa03f4a1065319e85c6ee90306971c301fd58c
      https://github.com/numpy/numpy/commit/91aa03f4a1065319e85c6ee90306971c301fd58c
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2013-03-27 (Wed, 27 Mar 2013)

  Changed paths:
    M doc/neps/missing-data.rst
    M doc/source/reference/arrays.classes.rst
    M numpy/add_newdocs.py
    M numpy/core/_internal.py
    M numpy/core/_methods.py
    M numpy/core/arrayprint.py
    M numpy/core/code_generators/genapi.py
    M numpy/core/machar.py
    M numpy/core/numeric.py
    M numpy/core/numerictypes.py
    M numpy/core/records.py
    M numpy/core/tests/test_blasdot.py
    M numpy/core/tests/test_item_selection.py
    M numpy/core/tests/test_multiarray.py
    M numpy/core/tests/test_multiarray_assignment.py
    M numpy/core/tests/test_nditer.py
    M numpy/core/tests/test_numeric.py
    M numpy/core/tests/test_records.py
    M numpy/core/tests/test_regression.py
    M numpy/core/tests/test_shape_base.py
    M numpy/core/tests/test_ufunc.py
    M numpy/core/tests/test_umath_complex.py
    M numpy/distutils/misc_util.py
    M numpy/f2py/crackfortran.py
    M numpy/f2py/tests/util.py
    M numpy/fft/fftpack.py
    M numpy/fft/helper.py
    M numpy/lib/arraypad.py
    M numpy/lib/function_base.py
    M numpy/lib/index_tricks.py
    M numpy/lib/npyio.py
    M numpy/lib/shape_base.py
    M numpy/lib/tests/test_financial.py
    M numpy/lib/tests/test_function_base.py
    M numpy/lib/tests/test_io.py
    M numpy/lib/tests/test_twodim_base.py
    M numpy/linalg/linalg.py
    M numpy/ma/extras.py
    M numpy/ma/tests/test_core.py
    M numpy/ma/tests/test_old_ma.py
    M numpy/matrixlib/tests/test_defmatrix.py
    M numpy/numarray/functions.py
    M numpy/oldnumeric/__init__.py
    M numpy/polynomial/tests/test_chebyshev.py
    M numpy/polynomial/tests/test_hermite.py
    M numpy/polynomial/tests/test_hermite_e.py
    M numpy/polynomial/tests/test_laguerre.py
    M numpy/polynomial/tests/test_legendre.py
    M numpy/polynomial/tests/test_polynomial.py
    M numpy/testing/tests/test_decorators.py
    M numpy/testing/tests/test_utils.py
    M tools/py3tool.py

  Log Message:
  -----------
  2to3: Replace xrange by range and use list(range(...)) where needed

In python3 range is an iterator and `xrange` has been removed. This has
two consequence for code:

    1) Where a list is needed `list(range(...))` must be used.
    2) `xrange` must be replaced by `range`

Both of these changes also work in python2 and this patch makes both.

There are three places fixed that do not need it, but I left them in
so that the result would be `xrange` clean.

Closes #3092


  Commit: b995d00e2e54bc6ff97f21bd179d1fc4dc3c92cb
      https://github.com/numpy/numpy/commit/b995d00e2e54bc6ff97f21bd179d1fc4dc3c92cb
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2013-03-27 (Wed, 27 Mar 2013)

  Changed paths:
    M tools/py3tool.py

  Log Message:
  -----------
  BUG: Rebased tools/py3tool.py was missing `,` in list.


  Commit: 40742184df68fc01f3392c9865f35d5402e74b01
      https://github.com/numpy/numpy/commit/40742184df68fc01f3392c9865f35d5402e74b01
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2013-03-28 (Thu, 28 Mar 2013)

  Changed paths:
    M doc/neps/missing-data.rst
    M doc/source/reference/arrays.classes.rst
    M numpy/add_newdocs.py
    M numpy/core/_internal.py
    M numpy/core/_methods.py
    M numpy/core/arrayprint.py
    M numpy/core/code_generators/genapi.py
    M numpy/core/machar.py
    M numpy/core/numeric.py
    M numpy/core/numerictypes.py
    M numpy/core/records.py
    M numpy/core/tests/test_blasdot.py
    M numpy/core/tests/test_item_selection.py
    M numpy/core/tests/test_multiarray.py
    M numpy/core/tests/test_multiarray_assignment.py
    M numpy/core/tests/test_nditer.py
    M numpy/core/tests/test_numeric.py
    M numpy/core/tests/test_records.py
    M numpy/core/tests/test_regression.py
    M numpy/core/tests/test_shape_base.py
    M numpy/core/tests/test_ufunc.py
    M numpy/core/tests/test_umath_complex.py
    M numpy/distutils/misc_util.py
    M numpy/f2py/crackfortran.py
    M numpy/f2py/tests/util.py
    M numpy/fft/fftpack.py
    M numpy/fft/helper.py
    M numpy/lib/arraypad.py
    M numpy/lib/function_base.py
    M numpy/lib/index_tricks.py
    M numpy/lib/npyio.py
    M numpy/lib/shape_base.py
    M numpy/lib/tests/test_financial.py
    M numpy/lib/tests/test_function_base.py
    M numpy/lib/tests/test_io.py
    M numpy/lib/tests/test_twodim_base.py
    M numpy/linalg/linalg.py
    M numpy/ma/extras.py
    M numpy/ma/tests/test_core.py
    M numpy/ma/tests/test_old_ma.py
    M numpy/matrixlib/tests/test_defmatrix.py
    M numpy/numarray/functions.py
    M numpy/oldnumeric/__init__.py
    M numpy/polynomial/tests/test_chebyshev.py
    M numpy/polynomial/tests/test_hermite.py
    M numpy/polynomial/tests/test_hermite_e.py
    M numpy/polynomial/tests/test_laguerre.py
    M numpy/polynomial/tests/test_legendre.py
    M numpy/polynomial/tests/test_polynomial.py
    M numpy/testing/tests/test_decorators.py
    M numpy/testing/tests/test_utils.py
    M tools/py3tool.py

  Log Message:
  -----------
  Merge pull request #3122 from charris/2to3-apply-xrange-fixer

2to3: Replace xrange by range and use list(range(...)) where needed


Compare: https://github.com/numpy/numpy/compare/db75eb44a31f...40742184df68


More information about the Numpy-svn mailing list