[Python-3000-checkins] r57427 - python/branches/py3k/Lib/imputil.py

neal.norwitz python-3000-checkins at python.org
Sat Aug 25 01:17:29 CEST 2007


Author: neal.norwitz
Date: Sat Aug 25 01:17:28 2007
New Revision: 57427

Modified:
   python/branches/py3k/Lib/imputil.py
Log:
Use the str builtin

Modified: python/branches/py3k/Lib/imputil.py
==============================================================================
--- python/branches/py3k/Lib/imputil.py	(original)
+++ python/branches/py3k/Lib/imputil.py	Sat Aug 25 01:17:28 2007
@@ -21,7 +21,6 @@
 
 __all__ = ["ImportManager","Importer","BuiltinImporter"]
 
-_StringType = type('')
 _ModuleType = type(sys)         ### doesn't work in JPython...
 
 class ImportManager:
@@ -183,7 +182,7 @@
         # scan sys.path looking for a location in the filesystem that contains
         # the module, or an Importer object that can import the module.
         for item in sys.path:
-            if isinstance(item, _StringType):
+            if isinstance(item, str):
                 module = self.fs_imp.import_from_dir(item, name)
             else:
                 module = item.import_top(name)


More information about the Python-3000-checkins mailing list