diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-02-28 13:19:41 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-02-28 13:19:41 -0700 |
commit | 9a73697c70e667c4655a01d3f76e5a9e850f1798 (patch) | |
tree | ab8b03aa0404e875c4b1082e56a38ee62d8b3bdc /numpy/testing/utils.py | |
parent | b990ed5a18b58715fa1e13642bc7f6761e597818 (diff) | |
download | numpy-9a73697c70e667c4655a01d3f76e5a9e850f1798.tar.gz |
REF: Replace filters with list comprehensions.
2to3 does a lot of list(filter(...)) sort of thing which can be
avoided by using list comprehensions instead of filters. This
also seems to clarify the code to a considerable degree.
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r-- | numpy/testing/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py index 09ac363e5..b4dbb89cd 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -1050,7 +1050,7 @@ def decorate_methods(cls, decorator, testmatch=None): # delayed import to reduce startup time from inspect import isfunction - methods = list(filter(isfunction, cls_attr.values())) + methods = [_m for _m in cls_attr.values() if isfunction(_m)] for function in methods: try: if hasattr(function, 'compat_func_name'): |