def _process_sort_string(sort_string):
    """Returns a list of tuples: (sort condition, reverse sort)"""
    cmp = []
    for attrname in sort_string.split(','):
        attrname = attrname.strip()
        rev = False
        if attrname.endswith('+'):
            attrname = attrname[:-1]
        elif attrname.endswith('-'):
            attrname = attrname[:-1]
            rev = True
        cmp.append((attrname, rev))
    return cmp
