diff options
author | Raymond Hettinger <python@rcn.com> | 2008-03-13 00:19:26 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-03-13 00:19:26 (GMT) |
commit | 17301e9fab311badbbe26a1efcb2decf637b324a (patch) | |
tree | 1326aa6f309cc11fa17b4aee81c26eea77d47e1e /Lib/filecmp.py | |
parent | 45832ea4082c6df50021dbeb9a157aad851fdeb8 (diff) | |
download | cpython-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.py | 4 |
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))) |