'Return a copy of this :class:`.BindParameter` with the given value set.'

def _with_value(self, value):

    cloned = self._clone()
    cloned.value = value
    cloned.callable = None
    cloned.required = False
    if (cloned.type is type_api.NULLTYPE):
        cloned.type = type_api._type_map.get(type(value), type_api.NULLTYPE)
    return cloned
