Message236435
| Author |
vstinner |
| Recipients |
josh.r, rhettinger, serhiy.storchaka, vstinner, wbolster |
| Date |
2015年02月23日.10:56:10 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1424688971.15.0.492360579953.issue23493@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
If I remember correctly, the complexity and performance of sort/sorted depends if the data set is sorted or not. You may recreated the list/dictionary at each iteration to get performances closer to "items = sorted(dct.items(), key=lambda kv: kv[0])" (dict keys are not sorted by their content, especially with strings). |
|