[Python-3000-checkins] r55917 - python/branches/py3k-struni/Lib/modulefinder.py

guido.van.rossum python-3000-checkins at python.org
Tue Jun 12 02:25:13 CEST 2007


Author: guido.van.rossum
Date: Tue Jun 12 02:25:08 2007
New Revision: 55917

Modified:
   python/branches/py3k-struni/Lib/modulefinder.py
Log:
Some quick fixes of code that was sorting dict.keys() etc.


Modified: python/branches/py3k-struni/Lib/modulefinder.py
==============================================================================
--- python/branches/py3k-struni/Lib/modulefinder.py	(original)
+++ python/branches/py3k-struni/Lib/modulefinder.py	Tue Jun 12 02:25:08 2007
@@ -487,8 +487,7 @@
         print("  %-25s %s" % ("Name", "File"))
         print("  %-25s %s" % ("----", "----"))
         # Print modules found
-        keys = self.modules.keys()
-        keys.sort()
+        keys = sorted(self.modules.keys())
         for key in keys:
             m = self.modules[key]
             if m.__path__:
@@ -503,8 +502,7 @@
             print()
             print("Missing modules:")
             for name in missing:
-                mods = self.badmodules[name].keys()
-                mods.sort()
+                mods = sorted(self.badmodules[name].keys())
                 print("?", name, "imported from", ', '.join(mods))
         # Print modules that may be missing, but then again, maybe not...
         if maybe:
@@ -512,8 +510,7 @@
             print("Submodules thay appear to be missing, but could also be", end=' ')
             print("global names in the parent package:")
             for name in maybe:
-                mods = self.badmodules[name].keys()
-                mods.sort()
+                mods = sorted(self.badmodules[name].keys())
                 print("?", name, "imported from", ', '.join(mods))
 
     def any_missing(self):


More information about the Python-3000-checkins mailing list