Skip to content

Instantly share code, notes, and snippets.

@miohtama
Created May 20, 2012 11:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miohtama/2757708 to your computer and use it in GitHub Desktop.
Save miohtama/2757708 to your computer and use it in GitHub Desktop.
Python 2.6 compatible OrderedDict
# Python 2.6 compatible ordered dict
# NOTE: API is not 1:1, but for normal dict access of
# set member, iterate keys and values this is enough
# Add odict egg to your project http://pypi.python.org/pypi/odict/
try:
from collections import OrderedDict
except ImportError:
from odict import odict as OrderedDict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment