[Numpy-svn] [numpy/numpy] 342f07: 2to3: Remove xreadlines and replace f.readlines() ...

GitHub noreply@github....
Tue Mar 5 15:10:44 CST 2013


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 342f074eb412e4cc19ab31a35a4ca04449e61597
      https://github.com/numpy/numpy/commit/342f074eb412e4cc19ab31a35a4ca04449e61597
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2013-03-05 (Tue, 05 Mar 2013)

  Changed paths:
    M numpy/core/code_generators/genapi.py
    M numpy/core/setup.py
    M numpy/distutils/command/build_src.py
    M numpy/distutils/command/install.py
    M numpy/distutils/conv_template.py
    M numpy/distutils/fcompiler/__init__.py
    M numpy/distutils/fcompiler/ibm.py
    M numpy/distutils/from_template.py
    M numpy/distutils/misc_util.py
    M numpy/distutils/system_info.py
    M tools/c_coverage/c_coverage_report.py
    M tools/py3tool.py
    M tools/win32build/misc/x86analysis.py

  Log Message:
  -----------
  2to3: Remove xreadlines and replace f.readlines() by f where valid.

An open file `f` has been an iterator since python2.3 and
`f.xreadlines()` is no longer needed, so replace it with `f`. Also
replace `f.readlines()` with `f` where an iterator will do. The
replacement of `f.readlines()` is not critical because it is a list in
both python2 and python3, but the code is a bit cleaner.

Closes #3093


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

  Changed paths:
    M numpy/core/code_generators/genapi.py
    M numpy/core/setup.py
    M numpy/distutils/command/build_src.py
    M numpy/distutils/command/install.py
    M numpy/distutils/conv_template.py
    M numpy/distutils/fcompiler/__init__.py
    M numpy/distutils/fcompiler/ibm.py
    M numpy/distutils/from_template.py
    M numpy/distutils/misc_util.py
    M numpy/distutils/system_info.py
    M tools/c_coverage/c_coverage_report.py
    M tools/py3tool.py
    M tools/win32build/misc/x86analysis.py

  Log Message:
  -----------
  Merge pull request #3121 from charris/2to3-fix-for-in-f_dot_readlines

2to3: Remove xreadlines and replace f.readlines() by f where valid.


Compare: https://github.com/numpy/numpy/compare/9311fb7e861e...e108e1c43466


More information about the Numpy-svn mailing list