This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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).
History
Date User Action Args
2015-02-23 10:56:11vstinnersetrecipients: + vstinner, rhettinger, serhiy.storchaka, wbolster, josh.r
2015-02-23 10:56:11vstinnersetmessageid: <1424688971.15.0.492360579953.issue23493@psf.upfronthosting.co.za>
2015-02-23 10:56:11vstinnerlinkissue23493 messages
2015-02-23 10:56:10vstinnercreate