def reorder_release_entries(releases):
    """
    Mutate ``releases`` so the entrylist in each is ordered by feature/bug/etc.
    """
    order = {'feature': 0, 'bug': 1, 'support': 2}
    for release in releases:
        entries = release['entries'][:]
        release['entries'] = sorted(entries, key=lambda x: order[x.type])
def reorder_release_entries ( releases ) : order = { 'feature' : 0 , 'bug' : 1 , 'support' : 2 } for release in releases : entries = release [ 'entries' ] [ : ] release [ 'entries' ] = sorted ( entries , key = lambda x : order [ x . type ] )
Mutate ``releases`` so the entrylist in each is ordered by feature/bug/etc.