Christian Tanzer added the comment: Josh Rosenberg wrote at Fri, 23 Oct 2015 02:56:30 +0000:
> As a workaround (should you absolutely need to sort keys by some > arbitrary criteria), you can initialize a collections.OrderedDict from > the sorted items of your original dict (using whatever key function > you like), then dump without using sort_keys=True. Sigh... I already implemented a workaround but it's not as simple as you think — the dictionary in question is nested. The problem is that this is just another unnecessary difficulty when trying to move to Python 3.x. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25457> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com