commit | c145ef3728f3cf036ec4fee40734f2bfe33aeac1 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Mon Feb 26 14:08:27 2007 +0000 |
committer | Guido van Rossum <guido@python.org> | Mon Feb 26 14:08:27 2007 +0000 |
tree | 454359d998b52a7ba2287fb4eb82db08b819a786 | |
parent | 94ab00036611a30137383465453cdb20105d42c3 [diff] [blame] |
Use better idiom to sort keys.
diff --git a/Lib/token.py b/Lib/token.py index 2257ebf..147536c 100755 --- a/Lib/token.py +++ b/Lib/token.py
@@ -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)