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/_import_tools.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/_import_tools.py')
-rw-r--r-- | numpy/_import_tools.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/_import_tools.py b/numpy/_import_tools.py index 6223dd57f..b09e1b08d 100644 --- a/numpy/_import_tools.py +++ b/numpy/_import_tools.py @@ -207,7 +207,7 @@ class PackageLoader(object): if symbols is None: symbols = eval('dir(%s)' % (package_name), frame.f_globals,frame.f_locals) - symbols = filter(lambda s:not s.startswith('_'),symbols) + symbols = [s for s in symbols if not s.startswith('_')] else: symbols = [symbol] |