Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c145ef3

Browse files
committed
Use better idiom to sort keys.
1 parent 94ab000 commit c145ef3

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Lib/token.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ def main():
108108
name, val = match.group(1, 2)
109109
val = int(val)
110110
tokens[val] = name # reverse so we can sort them...
111-
keys = list(tokens.keys())
112-
keys.sort()
111+
keys = sorted(tokens.keys())
113112
# load the output skeleton from the target:
114113
try:
115114
fp = open(outFileName)

0 commit comments

Comments
 (0)