diff options
author | Alex Henrie <alexhenrie24@gmail.com> | 2019-09-15 17:40:26 -0600 |
---|---|---|
committer | Alex Henrie <alexhenrie24@gmail.com> | 2019-09-15 17:40:26 -0600 |
commit | 0b12f51651b2930cb085430a7db2babf0c739e7e (patch) | |
tree | f23f7bf720a20fea5935808af1893f866b1fa879 /numpy/lib/utils.py | |
parent | 33d5f9c23da18ed3b5ed5b8efc5c26297ed2d7ea (diff) | |
download | numpy-0b12f51651b2930cb085430a7db2babf0c739e7e.tar.gz |
MAINT: Simplify lookfor function
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r-- | numpy/lib/utils.py | 7 |
1 files changed, 1 insertions, 6 deletions
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 |