From 0b12f51651b2930cb085430a7db2babf0c739e7e Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Sun, 15 Sep 2019 17:40:26 -0600 Subject: MAINT: Simplify lookfor function --- numpy/lib/utils.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'numpy/lib/utils.py') diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index 8bcbd8e86..3c71d2a7c 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -788,13 +788,8 @@ def lookfor(what, module=None, import_modules=True, regenerate=False, if kind in ('module', 'object'): # don't show modules or objects continue - ok = True doc = docstring.lower() - for w in whats: - if w not in doc: - ok = False - break - if ok: + if all(w in doc for w in whats): found.append(name) # Relevance sort -- cgit v1.2.1