Skip to content

Instantly share code, notes, and snippets.

View alexrudy's full-sized avatar

Alex Rudy alexrudy

View GitHub Profile
@enaeseth
enaeseth / yaml_ordered_dict.py
Created February 25, 2011 19:54
Load YAML mappings as ordered dictionaries
import yaml
import yaml.constructor
try:
# included in standard lib from Python 2.7
from collections import OrderedDict
except ImportError:
# try importing the backported drop-in replacement
# it's available on PyPI
from ordereddict import OrderedDict