diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-02-28 10:58:40 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-02-28 10:58:40 -0700 |
commit | b990ed5a18b58715fa1e13642bc7f6761e597818 (patch) | |
tree | 1c00d8287357e42d3e4cbc08291b939851ad10c1 /numpy/distutils/command/build_src.py | |
parent | 0934653e151969f6912c911b5113306bd5f450f1 (diff) | |
download | numpy-b990ed5a18b58715fa1e13642bc7f6761e597818.tar.gz |
2to3: Apply `filter` fixes. Closes #3053.
Generally, this involves using list comprehension, or explicit list
construction as `filter` is an iterator in Python 3.
Diffstat (limited to 'numpy/distutils/command/build_src.py')
-rw-r--r-- | numpy/distutils/command/build_src.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/distutils/command/build_src.py b/numpy/distutils/command/build_src.py index 7bf3b43ce..75dc5e12b 100644 --- a/numpy/distutils/command/build_src.py +++ b/numpy/distutils/command/build_src.py @@ -186,8 +186,8 @@ class build_src(build_ext.build_ext): build_dir = self.get_package_dir('.'.join(d.split(os.sep))) else: build_dir = os.path.join(self.build_src,d) - funcs = filter(lambda f:hasattr(f, '__call__'), files) - files = filter(lambda f:not hasattr(f, '__call__'), files) + funcs = [f for f in files if hasattr(f, '__call__')] + files = [f for f in files if not hasattr(f, '__call__')] for f in funcs: if f.func_code.co_argcount==1: s = f(build_dir) |