From 9a07b49f87b19fa35612a1ade86abcba5b9be6d8 Mon Sep 17 00:00:00 2001 From: "brett.cannon" Date: Sun, 3 Aug 2008 23:46:46 +0000 Subject: [PATCH] Move filecmp from using dict.has_key() to dict.__contains__() to silence warnings triggered under -3. git-svn-id: http://svn.python.org/projects/python/trunk@65453 6015fed2-1504-0410-9fe1-9d1591cc4771 --- Lib/filecmp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/filecmp.py b/Lib/filecmp.py index 35cedef6b8..9885765031 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 = [] -- 2.11.4.GIT