def empty_str_from(target):
    """
    Produces a function that will turn a string into an empty string if it
    matches the given target.
    """

    def func(raw):
        """
        The function which will do the conversion.
        """

        if raw == target:
            return None
        return raw

    return func