aboutsummaryrefslogtreecommitdiff
path: root/mammoth/lists.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-12-01 20:29:00 +0000
committerMichael Williamson <mike@zwobble.org>2013-12-01 20:29:00 +0000
commit7a9484ee7f85a0c986f620c5d3cbbd2b11d28df8 (patch)
tree53b972cd32336b188e9eeb95c9ac74495cc3ac01 /mammoth/lists.py
parentd3896a5b95f6f90b4181934d16ee0be8b7d8cab4 (diff)
Add better Python 3 support
Diffstat (limited to 'mammoth/lists.py')
-rw-r--r--mammoth/lists.py11
1 files changed, 11 insertions, 0 deletions
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))