Commit bd4132f
committed
Drop unneeded key arguments for sorting dict items
Passing a key argument of the form `key=lambda item: item[0]` to
sorted() when sorting dict items is unneeded, because tuples already
compare element-wise, and the first elements are known to be unique
since they are dictionary keys.1 parent 38fdb7d commit bd4132f
2 files changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
0 commit comments