Skip to content

A Smart, Automatic, Fast and Lightweight Web Scraper for Python

refactor: use builtin all instead of forall

cthulhu-irl97e96e5965f4
diff --git a/autoscraper/auto_scraper.py b/autoscraper/auto_scraper.py
index 907d2ce..57f32d1 100644
--- a/autoscraper/auto_scraper.py
+++ b/autoscraper/auto_scraper.py
@@ -96,7 +96,7 @@ class AutoScraper(object):
result_list = unique(result_list)
- if forall(lambda x: x in wanted_list, result_list):
+ if all(item in wanted_list for all item in result_list):
self.stack_list = unique(stack_list)
return result_list
diff --git a/autoscraper/utils.py b/autoscraper/utils.py
index f3bde54..f9466b0 100644
--- a/autoscraper/utils.py
+++ b/autoscraper/utils.py
@@ -6,9 +6,3 @@ def unique(lst):
return unique_lst
-def forall(fn, lst):
- for item in lst:
- if not fn(lst):
- return False
-
- return True