def parse_range(textrange):
    """Parse a patch range, handling the "1" special-case

    :param textrange: The text to parse
    :type textrange: str
    :return: the position and range, as a tuple
    :rtype: (int, int)
    """
    tmp = textrange.split(b',')
    if len(tmp) == 1:
        pos = tmp[0]
        range = b'1'
    else:
        pos, range = tmp
    pos = int(pos)
    range = int(range)
    return pos, range
