.. module:: pyeole.sort
    :synopsis: fonctions de tri

:mod:`pyeole.sort` -- fonctions de tri
=============================================


Pour récupérer une fonction de tri permettant de trier une liste de dictionnaire utiliser la fonction get_sort du module sort

::

    >>> from pyeole.sort import get_sort
    >>> mylist = [{'key':2, 'otherkey':'nothing to do with'}, {'key':1, 'otherkey2':"doesn't matter"}, {'key':5, 'otherkey3':''}]
    >>> sort_func = get_sort('key')
    >>> mylist.sort(sort_func)
    >>> print mylist
    [{'otherkey2': "doesn't matter", 'key': 1}, {'otherkey': 'nothing to do with', 'key': 2}, {'otherkey3': '', 'key': 5}]
