summaryrefslogtreecommitdiffstats
path: root/Lib/filecmp.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-03-13 00:19:26 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-03-13 00:19:26 (GMT)
commit17301e9fab311badbbe26a1efcb2decf637b324a (patch)
tree1326aa6f309cc11fa17b4aee81c26eea77d47e1e /Lib/filecmp.py
parent45832ea4082c6df50021dbeb9a157aad851fdeb8 (diff)
downloadcpython-17301e9fab311badbbe26a1efcb2decf637b324a.zip
cpython-17301e9fab311badbbe26a1efcb2decf637b324a.tar.gz
cpython-17301e9fab311badbbe26a1efcb2decf637b324a.tar.bz2
Issue 2186 and 2187. Move filter from itertools to builtins.
Diffstat (limited to 'Lib/filecmp.py')
-rw-r--r--Lib/filecmp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/filecmp.py b/Lib/filecmp.py
index 12ba3ef..14e1eb4 100644
--- a/Lib/filecmp.py
+++ b/Lib/filecmp.py
@@ -12,7 +12,7 @@ Functions:
import os
import stat
import warnings
-from itertools import ifilter, ifilterfalse, imap, izip
+from itertools import ifilterfalse, imap, izip
__all__ = ["cmp","dircmp","cmpfiles"]
@@ -132,7 +132,7 @@ class dircmp:
def phase1(self): # Compute common names
a = dict(izip(imap(os.path.normcase, self.left_list), self.left_list))
b = dict(izip(imap(os.path.normcase, self.right_list), self.right_list))
- self.common = list(map(a.__getitem__, ifilter(b.__contains__, a)))
+ self.common = list(map(a.__getitem__, filter(b.__contains__, a)))
self.left_only = list(map(a.__getitem__, ifilterfalse(b.__contains__, a)))
self.right_only = list(map(b.__getitem__, ifilterfalse(a.__contains__, b)))