From 342f074eb412e4cc19ab31a35a4ca04449e61597 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Tue, 5 Mar 2013 12:09:12 -0700 Subject: 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 --- numpy/core/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/setup.py') diff --git a/numpy/core/setup.py b/numpy/core/setup.py index 8c43f97c0..37f649e6b 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -484,7 +484,7 @@ def configuration(parent_package='',top_path=None): else: mathlibs = [] target_f = open(target) - for line in target_f.readlines(): + for line in target_f: s = '#define MATHLIB' if line.startswith(s): value = line[len(s):].strip() -- cgit v1.2.1