from datetime import datetime


def typed_value_from_string(value):
    """Convert a string into a value with a Python type.

    :param value: The string we want to convert.
    :return: The Python value
    """
    # Convert empty strings to None
    if not value:
        return None
    # Convert boolean strings
    if value in ['False', 'Non', "Faux"]:
        return False
    if value in ['True', "Oui", "Vrai"]:
        return True
    # Convert date string to date
    if len(value) == 10 and value[2] == "/" and value[5] == "/":
        try:
            return datetime.strptime(value, '%d/%m/%Y').date()
        except:
            raise ValueError("La valeur %s ne correspond pas au format de date jj/mm/aaaa" % (value))
    # Finally, value is a simple string
    return value