def parse_line(arg, n_args=None, type=int):
    """Convert a series of zero or more numbers to an argument tuple"""
    result = tuple(map(type, arg.split()))
    if isinstance(n_args, str):
        if n_args[-1] == '+':
            min_limit = int(n_args[:-1])
            if len(result) < min_limit:
                errormsg = 'expected minimum ' + str(min_limit
                    ) + ' arguments, received ' + str(len(result))
            else:
                errormsg = None
    elif isinstance(n_args, int):
        if n_args and len(result) != n_args:
            errormsg = 'expected ' + str(n_args
                ) + ' arguments, received ' + str(len(result))
        else:
            errormsg = None
    else:
        errormsg = None
    return result, errormsg
