From 7a9484ee7f85a0c986f620c5d3cbbd2b11d28df8 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 1 Dec 2013 20:29:00 +0000 Subject: Add better Python 3 support --- mammoth/lists.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 mammoth/lists.py (limited to 'mammoth/lists.py') diff --git a/mammoth/lists.py b/mammoth/lists.py new file mode 100644 index 0000000..24fa7c4 --- /dev/null +++ b/mammoth/lists.py @@ -0,0 +1,11 @@ +import sys + + +__all__ = ["filter"] + +if sys.version_info[0] == 2: + filter = filter +else: + import builtins + def filter(*args, **kwargs): + return list(builtins.filter(*args, **kwargs)) -- cgit v1.2.3