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 wbolster
Recipients wbolster
Date 2015-02-20.16:25:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1424449556.4.0.766318893285.issue23493@psf.upfronthosting.co.za>
In-reply-to
Content
The JSON encoder uses a lambda function for the sort(key=...) invocation used to sort the keys in a JSON object in case sort_keys=True is passed:

https://hg.python.org/cpython/file/46bfddb14cbe/Lib/json/encoder.py#l352

Instead of having a lambda, operator.itemgetter(0) can be used here, which is a minor performance gain. It should be noted that many other internals of the JSON encoder have also been fine-tuned (manually) for performance reasons.
History
Date User Action Args
2015-02-20 16:25:56wbolstersetrecipients: + wbolster
2015-02-20 16:25:56wbolstersetmessageid: <1424449556.4.0.766318893285.issue23493@psf.upfronthosting.co.za>
2015-02-20 16:25:56wbolsterlinkissue23493 messages
2015-02-20 16:25:56wbolstercreate