diff mercurial/lsprof.py @ 7622:4dd7b28003d2

use dict.iteritems() rather than dict.items() This should be faster and more future-proof. Calls where the result is to be sorted using util.sort() have been left unchanged. Calls to .items() on configparser objects have been left as-is, too.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 12 Jan 2009 09:16:03 +0100
parents 8fee8ff13d37
children 553aa0cbeab6
line wrap: on
line diff
--- a/mercurial/lsprof.py	Mon Jan 12 09:07:02 2009 +0100
+++ b/mercurial/lsprof.py	Mon Jan 12 09:16:03 2009 +0100
@@ -88,7 +88,7 @@
     try:
         mname = _fn2mod[code.co_filename]
     except KeyError:
-        for k, v in sys.modules.items():
+        for k, v in sys.modules.iteritems():
             if v is None:
                 continue
             if not hasattr(v, '__file__'):