summaryrefslogtreecommitdiffstats
path: root/Lib/filecmp.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-19 16:17:20 (GMT)
committerGuido van Rossum <guido@python.org>2006-08-19 16:17:20 (GMT)
commit6e23e3796d8b1794279c84757e253aba53c9144f (patch)
treee1cd3b1449a75d42b2b64f60769debcf22c31af9 /Lib/filecmp.py
parentcef3a1c1464f013c763f1a2447d15502288451ca (diff)
downloadcpython-6e23e3796d8b1794279c84757e253aba53c9144f.zip
cpython-6e23e3796d8b1794279c84757e253aba53c9144f.tar.gz
cpython-6e23e3796d8b1794279c84757e253aba53c9144f.tar.bz2
Only three failing tests left: dbm, gdbm, tcl!
Diffstat (limited to 'Lib/filecmp.py')
-rw-r--r--Lib/filecmp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/filecmp.py b/Lib/filecmp.py
index 35cedef..9885765 100644
--- a/Lib/filecmp.py
+++ b/Lib/filecmp.py
@@ -132,9 +132,9 @@ 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 = map(a.__getitem__, ifilter(b.has_key, a))
- self.left_only = map(a.__getitem__, ifilterfalse(b.has_key, a))
- self.right_only = map(b.__getitem__, ifilterfalse(a.has_key, b))
+ self.common = map(a.__getitem__, ifilter(b.__contains__, a))
+ self.left_only = map(a.__getitem__, ifilterfalse(b.__contains__, a))
+ self.right_only = map(b.__getitem__, ifilterfalse(a.__contains__, b))
def phase2(self): # Distinguish files, directories, funnies
self.common_dirs = []