summaryrefslogtreecommitdiff
path: root/mammoth/lists.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-12-26 11:01:22 +0000
committerMichael Williamson <mike@zwobble.org>2015-12-26 11:08:18 +0000
commit03f7d77da6ce807effa5494f161aab07fdd2498c (patch)
tree631d62cfc647e139a9ca27097c250af834d1ff59 /mammoth/lists.py
parent5a5112f8c0286da6875e54b2e61a32288135d1e8 (diff)
Always use mc:Fallback when reading mc:AlternateContent elements
Diffstat (limited to 'mammoth/lists.py')
-rw-r--r--mammoth/lists.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mammoth/lists.py b/mammoth/lists.py
index 6e39ae0..e8477cb 100644
--- a/mammoth/lists.py
+++ b/mammoth/lists.py
@@ -24,6 +24,14 @@ def unique(values):
return output
+def flat_map(func, values):
+ return [
+ element
+ for value in values
+ for element in func(value)
+ ]
+
+
if sys.version_info[0] == 2:
map = map
filter = filter