]> granicus.if.org Git - python/commitdiff
Use the str builtin
authorNeal Norwitz <nnorwitz@gmail.com>
Fri, 24 Aug 2007 23:17:28 +0000 (23:17 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Fri, 24 Aug 2007 23:17:28 +0000 (23:17 +0000)
Lib/imputil.py

index a0099a86e86591f537a68fb0a39938b401a63666..8cd492c2b02e7a328d3bd93c3c951ea70a080a90 100644 (file)
@@ -21,7 +21,6 @@ import marshal
 
 __all__ = ["ImportManager","Importer","BuiltinImporter"]
 
-_StringType = type('')
 _ModuleType = type(sys)         ### doesn't work in JPython...
 
 class ImportManager:
@@ -183,7 +182,7 @@ class ImportManager:
         # 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)