[Numpy-svn] [numpy/numpy] b990ed: 2to3: Apply `filter` fixes. Closes #3053.

GitHub noreply@github....
Fri Mar 1 09:55:40 CST 2013


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: b990ed5a18b58715fa1e13642bc7f6761e597818
      https://github.com/numpy/numpy/commit/b990ed5a18b58715fa1e13642bc7f6761e597818
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2013-02-28 (Thu, 28 Feb 2013)

  Changed paths:
    M numpy/_import_tools.py
    M numpy/distutils/command/build_py.py
    M numpy/distutils/command/build_src.py
    M numpy/distutils/misc_util.py
    M numpy/distutils/system_info.py
    M numpy/f2py/f2py2e.py
    M numpy/testing/utils.py
    M setup.py

  Log Message:
  -----------
  2to3: Apply `filter` fixes. Closes #3053.

Generally, this involves using list comprehension, or explicit list
construction as `filter` is an iterator in Python 3.


  Commit: 9a73697c70e667c4655a01d3f76e5a9e850f1798
      https://github.com/numpy/numpy/commit/9a73697c70e667c4655a01d3f76e5a9e850f1798
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2013-02-28 (Thu, 28 Feb 2013)

  Changed paths:
    M numpy/distutils/command/build_py.py
    M numpy/distutils/misc_util.py
    M numpy/distutils/system_info.py
    M numpy/f2py/f2py2e.py
    M numpy/testing/utils.py

  Log Message:
  -----------
  REF: Replace filters with list comprehensions.

2to3 does a lot of list(filter(...)) sort of thing which can be
avoided by using list comprehensions instead of filters. This
also seems to clarify the code to a considerable degree.


  Commit: 0e4e5084e1e4a2fb369db5b4f43c500c3a9cbcd8
      https://github.com/numpy/numpy/commit/0e4e5084e1e4a2fb369db5b4f43c500c3a9cbcd8
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2013-02-28 (Thu, 28 Feb 2013)

  Changed paths:
    M numpy/f2py/f2py2e.py

  Log Message:
  -----------
  BUG: Fix `not a in ...` to `a not in ...`.

Also break regular expression compiles out of the loop.


  Commit: 3c13c0a925276130d66be490eed4ae337712cce2
      https://github.com/numpy/numpy/commit/3c13c0a925276130d66be490eed4ae337712cce2
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2013-03-01 (Fri, 01 Mar 2013)

  Changed paths:
    M numpy/_import_tools.py
    M numpy/distutils/command/build_py.py
    M numpy/distutils/command/build_src.py
    M numpy/distutils/misc_util.py
    M numpy/distutils/system_info.py
    M numpy/f2py/f2py2e.py
    M numpy/testing/utils.py
    M setup.py

  Log Message:
  -----------
  Merge pull request #3056 from charris/2to3-filter

2to3: Apply `filter` fixes. Closes #3053.


Compare: https://github.com/numpy/numpy/compare/02cfcb99bc97...3c13c0a92527


More information about the Numpy-svn mailing list