[Numpy-svn] [numpy/numpy] 54ca3f: 2to3: Apply nonzero fixer.

GitHub noreply at github.com
Sun Apr 14 10:33:33 EDT 2013


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

  Changed paths:
    M numpy/oldnumeric/ma.py
    M tools/py3tool.py

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

In Python 3 the `__nonzero__` class method is replaced by `__bool__`.
This only affects the MaskedArray class in numpy/oldnumeric/ma.py file
and the simplest solution is to provide both methods. I have my doubts
that the fixed up Python 3 version was correct or even tested, but I
think the current solution should work for as long as oldnumeric stays
in numpy.

Closes #3073.


  Commit: 61c5ac6758d05da6cf49b7247eca850d9db83a7a
      https://github.com/numpy/numpy/commit/61c5ac6758d05da6cf49b7247eca850d9db83a7a
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2013-04-14 (Sun, 14 Apr 2013)

  Changed paths:
    M numpy/oldnumeric/ma.py
    M tools/py3tool.py

  Log Message:
  -----------
  Merge pull request #3241 from charris/2to3-apply-nonzero-fixer

2to3: Apply nonzero fixer.


Compare: https://github.com/numpy/numpy/compare/ff464ef985cb...61c5ac6758d0


More information about the Numpy-svn mailing list