Skip to content

Instantly share code, notes, and snippets.

@thomasboyt
Created July 24, 2012 00:36
Show Gist options
  • Save thomasboyt/3167172 to your computer and use it in GitHub Desktop.
Save thomasboyt/3167172 to your computer and use it in GitHub Desktop.
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