def _str_to_lint(astr, sep=',', sep2='-'):
    """Returns a list of integers for a given structured string of numbers.
    
    Parameters
    ----------
    s : str
        Comma separated nonnegative integers. E.g. 3,6,7 or 3,7-10,12
    sep : str, optional
        Separator, which is by default ",".         
    sep2 : str, optional
        Separator 2, which is by default "-".
        
    """
    lint = []
    try:
        for items in astr.strip().split(sep):
            item = items.strip().split(sep2)
            if len(item) == 1:
                lint += [int(item[0])]
            elif len(item) == 2:
                lint += range(int(item[0]), int(item[1]) + 1)
            else:
                return False
    except (TypeError, ValueError):
        return False
    return lint
