From 9a73697c70e667c4655a01d3f76e5a9e850f1798 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Thu, 28 Feb 2013 13:19:41 -0700 Subject: 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. --- numpy/testing/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/testing/utils.py') 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'): -- cgit v1.2.1