def bind_processor(self, dialect):
    datetime_date = datetime.date
    format_ = self._storage_format

    def process(value):
        if (value is None):
            return None
        elif isinstance(value, datetime_date):
            return (format_ % {'year': value.year, 'month': value.month, 'day': value.day})
        else:
            raise TypeError('SQLite Date type only accepts Python date objects as input.')
    return process
def bind_processor(self, dialect):
    datetime_date = datetime.date
    format_ = self._storage_format

    def process(value):
        if (value is None):
            return None
        elif isinstance(value, datetime_date):
            return (format_ % {'year': value.year, 'month': value.month, 'day': value.day})
        else:
            raise TypeError('SQLite Date type only accepts Python date objects as input.')
    return process