def _getdef(list, num, default=None):
    """
        Get value from list with default
    :param list: List to get value from
    :param num: Index to get
    :param default: Default to return if index isn't in list
    :return: Value at index, or default
    """
    if num < len(list):
        return list[num]
    return default