[Python-3000-checkins] r53938 - python/branches/p3yk/Lib/token.py

guido.van.rossum python-3000-checkins at python.org
Mon Feb 26 15:08:27 CET 2007


Author: guido.van.rossum
Date: Mon Feb 26 15:08:27 2007
New Revision: 53938

Modified:
   python/branches/p3yk/Lib/token.py
Log:
Use better idiom to sort keys.


Modified: python/branches/p3yk/Lib/token.py
==============================================================================
--- python/branches/p3yk/Lib/token.py	(original)
+++ python/branches/p3yk/Lib/token.py	Mon Feb 26 15:08:27 2007
@@ -108,8 +108,7 @@
             name, val = match.group(1, 2)
             val = int(val)
             tokens[val] = name          # reverse so we can sort them...
-    keys = list(tokens.keys())
-    keys.sort()
+    keys = sorted(tokens.keys())
     # load the output skeleton from the target:
     try:
         fp = open(outFileName)


More information about the Python-3000-checkins mailing list