From 6e23e3796d8b1794279c84757e253aba53c9144f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 19 Aug 2006 16:17:20 +0000 Subject: Only three failing tests left: dbm, gdbm, tcl! --- Lib/filecmp.py | 6 +++--- Lib/hotshot/log.py | 2 +- 2 files changed, 4 insertions(+), 4 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 = [] diff --git a/Lib/hotshot/log.py b/Lib/hotshot/log.py index 7d6d91d..df8f637 100644 --- a/Lib/hotshot/log.py +++ b/Lib/hotshot/log.py @@ -31,7 +31,7 @@ class LogReader: self._reader = _hotshot.logreader(logfn) self._nextitem = self._reader.next self._info = self._reader.info - if self._info.has_key('current-directory'): + if 'current-directory' in self._info: self.cwd = self._info['current-directory'] else: self.cwd = None -- cgit v0.12