def getrange(value):
    """ Returns a range(1, value + 1) """

    try:
        value = int(value)
    except ValueError:
        raise ValueError("Expected type: " + str(int) + ", got: " + str(type(value)))

    return range(1, value + 1)