]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use better idiom to sort keys.
authorGuido van Rossum <guido@python.org>
Mon, 26 Feb 2007 14:08:27 +0000 (14:08 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 26 Feb 2007 14:08:27 +0000 (14:08 +0000)
Lib/token.py

index 2257ebfe9b22b8fb04678e15a4034747bdf91040..147536c403a3ce6887cfc86c9db2987573334bfc 100755 (executable)
@@ -108,8 +108,7 @@ def main():
             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)