Created
October 3, 2013 13:06
-
-
Save JensRantil/6809518 to your computer and use it in GitHub Desktop.
Today's favourite code reviewal.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.utils.datastructures import SortedDict | |
dictionary = {} | |
# populating `dictionary`... | |
sortedDictionary = SortedDict() | |
for word in sorted(dictionary.iterkeys()): | |
sortedDictionary[word] = dictionary[word] | |
# Yepp, `sortedDictionary` is double sorted! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment