diff options
Diffstat (limited to 'utils/perf-training')
-rw-r--r-- | utils/perf-training/perf-helper.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/perf-training/perf-helper.py b/utils/perf-training/perf-helper.py index 30b9caeffd..6337a9b19a 100644 --- a/utils/perf-training/perf-helper.py +++ b/utils/perf-training/perf-helper.py @@ -295,8 +295,8 @@ def form_by_frequency(symbol_lists): for a in symbols: counts[a] = counts.get(a,0) + 1 - by_count = counts.items() - by_count.sort(key = lambda (_,n): -n) + by_count = list(counts.items()) + by_count.sort(key = lambda __n: -__n[1]) return [s for s,n in by_count] def form_by_random(symbol_lists): @@ -333,7 +333,7 @@ def genOrderFile(args): help="write a list of the unordered symbols to PATH (requires --binary)", default=None, metavar="PATH") parser.add_argument("--method", dest="method", - help="order file generation method to use", choices=methods.keys(), + help="order file generation method to use", choices=list(methods.keys()), default='call_order') opts = parser.parse_args(args) |