(stream, Loader=yaml.Loader, object_pairs_hook=OrderedDict)
return yaml.load(stream, OrderedLoader)
Loads yaml into an OrderedDict.

    From:
    https://stackoverflow.com/questions/5121931/in-python-how-can-you-load-yaml-mappings-as-ordereddicts
Loads yaml into an OrderedDict.
Loads yaml into an OrderedDict .
def __ordered_load(stream, Loader=yaml.Loader, object_pairs_hook=OrderedDict):
    """
    Loads yaml into an OrderedDict.

    From:
    https://stackoverflow.com/questions/5121931/in-python-how-can-you-load-yaml-mappings-as-ordereddicts

    """

    class OrderedLoader(Loader):
        pass

    def construct_mapping(loader, node):
        loader.flatten_mapping(node)
        return object_pairs_hook(loader.construct_pairs(node))

    OrderedLoader.add_constructor(
        yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG,
        construct_mapping)
    return yaml.load(stream, OrderedLoader)
def __ordered_load ( stream , Loader = yaml . Loader , object_pairs_hook = OrderedDict ) : class OrderedLoader ( Loader ) : pass def construct_mapping ( loader , node ) : loader . flatten_mapping ( node ) return object_pairs_hook ( loader . construct_pairs ( node ) ) OrderedLoader . add_constructor ( yaml . resolver . BaseResolver . DEFAULT_MAPPING_TAG , construct_mapping ) return yaml . load ( stream , OrderedLoader )