[Python-3000-checkins] r51409 - in python/branches/p3yk/Lib: filecmp.py hotshot/log.py
guido.van.rossum
python-3000-checkins at python.org
Sat Aug 19 18:17:20 CEST 2006
Author: guido.van.rossum
Date: Sat Aug 19 18:17:20 2006
New Revision: 51409
Modified:
python/branches/p3yk/Lib/filecmp.py
python/branches/p3yk/Lib/hotshot/log.py
Log:
Only three failing tests left: dbm, gdbm, tcl!
Modified: python/branches/p3yk/Lib/filecmp.py
==============================================================================
--- python/branches/p3yk/Lib/filecmp.py (original)
+++ python/branches/p3yk/Lib/filecmp.py Sat Aug 19 18:17:20 2006
@@ -132,9 +132,9 @@
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 = []
Modified: python/branches/p3yk/Lib/hotshot/log.py
==============================================================================
--- python/branches/p3yk/Lib/hotshot/log.py (original)
+++ python/branches/p3yk/Lib/hotshot/log.py Sat Aug 19 18:17:20 2006
@@ -31,7 +31,7 @@
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
More information about the Python-3000-checkins
mailing list