[Python-checkins] r65464 - python/trunk/Lib/modulefinder.py
brett.cannon
python-checkins at python.org
Mon Aug 4 02:27:29 CEST 2008
Author: brett.cannon
Date: Mon Aug 4 02:27:29 2008
New Revision: 65464
Log:
Silence warnings under -3 about using dict.has_key() for modulefinder.
Modified:
python/trunk/Lib/modulefinder.py
Modified: python/trunk/Lib/modulefinder.py
==============================================================================
--- python/trunk/Lib/modulefinder.py (original)
+++ python/trunk/Lib/modulefinder.py Mon Aug 4 02:27:29 2008
@@ -258,7 +258,7 @@
else:
self.msgout(3, "import_module ->", m)
return m
- if self.badmodules.has_key(fqname):
+ if fqname in self.badmodules:
self.msgout(3, "import_module -> None")
return None
if parent and parent.__path__ is None:
@@ -279,7 +279,8 @@
self.msgout(3, "import_module ->", m)
return m
- def load_module(self, fqname, fp, pathname, (suffix, mode, type)):
+ def load_module(self, fqname, fp, pathname, file_info):
+ suffix, mode, type = file_info
self.msgin(2, "load_module", fqname, fp and "fp", pathname)
if type == imp.PKG_DIRECTORY:
m = self.load_package(fqname, pathname)
@@ -460,7 +461,7 @@
return m
def add_module(self, fqname):
- if self.modules.has_key(fqname):
+ if fqname in self.modules:
return self.modules[fqname]
self.modules[fqname] = m = Module(fqname)
return m
More information about the Python-checkins
mailing list