Message138238
| Author |
mark.dickinson |
| Recipients |
DDarko, mark.dickinson |
| Date |
2011年06月13日.12:42:11 |
| SpamBayes Score |
0.0002494226 |
| Marked as misclassified |
No |
| Message-id |
<1307968932.29.0.27141670551.issue12324@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> In this example, I'm sort by item number 1, which is a list, and its
> first value is an int.
? You're sorting by the values of the dict d, and those values have the form [int, int, dict]; so when the two ints match (e.g., in your data, there are two values of the form [64, 124, {...}]) there's a dictionary comparison.
Did you mean to do:
sorted(d.values(), key=operator.itemgetter(1), reverse=1)
? |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年06月13日 12:42:12 | mark.dickinson | set | recipients:
+ mark.dickinson, DDarko |
| 2011年06月13日 12:42:12 | mark.dickinson | set | messageid: <1307968932.29.0.27141670551.issue12324@psf.upfronthosting.co.za> |
| 2011年06月13日 12:42:11 | mark.dickinson | link | issue12324 messages |
| 2011年06月13日 12:42:11 | mark.dickinson | create |
|