Created
July 24, 2012 00:36
-
-
Save thomasboyt/3167172 to your computer and use it in GitHub Desktop.
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
def ordered_to_dict(ordered_dict): | |
reg_dict = dict(ordered_dict) | |
for key, value in reg_dict.iteritems(): | |
if isinstance(value, OrderedDict): | |
reg_dict[key] = ordered_to_dict(value) | |
return reg_dict |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment