From 03f7d77da6ce807effa5494f161aab07fdd2498c Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 26 Dec 2015 11:01:22 +0000 Subject: Always use mc:Fallback when reading mc:AlternateContent elements --- mammoth/lists.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mammoth/lists.py') 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 -- cgit v1.2.3