aboutsummaryrefslogtreecommitdiff
path: root/src/ee/_utils.py
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-12-20 15:23:41 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2017-12-20 15:23:41 +0100
commit867852503157299b67fe05645aea11b9da0f2a84 (patch)
treeaaff6ce69aeeca3550326a002d21fa15880c40a1 /src/ee/_utils.py
parentf9a16187f3b4fda0790c34997ca24db749ddf86d (diff)
downloadee-python-867852503157299b67fe05645aea11b9da0f2a84.tar.gz
ee-python-867852503157299b67fe05645aea11b9da0f2a84.tar.bz2
ee-python-867852503157299b67fe05645aea11b9da0f2a84.tar.xz
ee-python-867852503157299b67fe05645aea11b9da0f2a84.zip
o Making a setter for EeVal that returns a new EeVal.
Diffstat (limited to 'src/ee/_utils.py')
-rw-r--r--src/ee/_utils.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ee/_utils.py b/src/ee/_utils.py
index 9df6126..0551b89 100644
--- a/src/ee/_utils.py
+++ b/src/ee/_utils.py
@@ -16,3 +16,20 @@ def run_filters(filters, obj):
if not f(obj):
return False
return True
+
+def any(filters):
+ def f(obj):
+ for f in filters:
+ if f(obj):
+ return True
+ return False
+ return f
+
+
+def all(filters):
+ def f(obj):
+ for f in filters:
+ if not f(obj):
+ return False
+ return True
+ return f