[Numpy-svn] [numpy/numpy] c6de09: 2to3: Apply next fixer.

GitHub noreply at github.com
Mon Apr 15 11:35:15 EDT 2013


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: c6de09799decbb22bb2d7a44036f53c30356edda
      https://github.com/numpy/numpy/commit/c6de09799decbb22bb2d7a44036f53c30356edda
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2013-04-15 (Mon, 15 Apr 2013)

  Changed paths:
    M doc/sphinxext/numpydoc/comment_eater.py
    M numpy/core/tests/test_nditer.py
    M numpy/lib/index_tricks.py
    M numpy/lib/npyio.py
    M numpy/linalg/lapack_lite/fortran.py
    M numpy/ma/core.py
    M tools/py3tool.py

  Log Message:
  -----------
  2to3: Apply next fixer.

The next builtin has been available since Python 2.6 and allows
`it.next()` to be replaced by `next(it)`. In Python 3 the `next` method
is gone entirely, replaced entirely by the `__next__` method. The next
fixer changes all the `it.next()` calls to the new form and renames the
`next` methods to `__next__`. In order to keep  Numpy code backwards
compatible with Python 2, a `next` method was readded to all the Numpy
iterators after the fixer was run so they all contain both methods. The
presence of the appropriate method could have been made version
dependent, but that looked unduly complicated.

Closes #3072.


  Commit: 9361471ebf49d31761e8ed9d7dc6512abe3241a9
      https://github.com/numpy/numpy/commit/9361471ebf49d31761e8ed9d7dc6512abe3241a9
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2013-04-15 (Mon, 15 Apr 2013)

  Changed paths:
    M doc/sphinxext/numpydoc/comment_eater.py
    M numpy/core/tests/test_nditer.py
    M numpy/lib/index_tricks.py
    M numpy/lib/npyio.py
    M numpy/linalg/lapack_lite/fortran.py
    M numpy/ma/core.py
    M tools/py3tool.py

  Log Message:
  -----------
  Merge pull request #3249 from charris/2to3-apply-next-fixer

2to3: Apply next fixer.


Compare: https://github.com/numpy/numpy/compare/a196d789fbb8...9361471ebf49


More information about the Numpy-svn mailing list