Taking a bound_args object, and an |ArgumentAddress| and a value, sets
    the value pointed to by the address to `value`.
502504
def set_argument(bound_args, address, value):
    
    if address.kind == ArgumentKind.regular:
        bound_args.arguments[address.name] = value
        return

    if address.kind == ArgumentKind.variadic:
        if address.name not in bound_args.arguments:
            bound_args.arguments[address.name] = []

        n_args = len(bound_args.arguments[address.name])
        if address.key >= n_args:
            bound_args.arguments[address.name].extend(
                repeat(Empty, address.key - n_args + 1))

    if address.kind == ArgumentKind.keyword:
        if address.name not in bound_args.arguments:
            bound_args.arguments[address.name] = {}

    bound_args.arguments[address.name][address.key] = value
382575
private void setScalarValue(
            final CommandLineArgumentParser commandLineArgumentParser,
            final List<String> originalValues) // Note that these might be tag surrogates
    {
        if (getHasBeenSet() || originalValues.size() > 1) {
            throw new CommandLineException.BadArgumentValue(
                    String.format("Argument '%s' cannot be specified more than once.", getArgumentAliasDisplayString()));
        }

        if (isFlag() && originalValues.isEmpty()){
            setArgumentValue(true);
        } else {
            final String stringValue = originalValues.get(0);
            Object value = null;
            if (stringValue.equals(NULL_ARGUMENT_STRING)) {
                if (getUnderlyingField().getType().isPrimitive()) {
                    throw new CommandLineException.BadArgumentValue(
                            String.format("Argument '%s' is not a nullable argument type.", getArgumentAliasDisplayString()));
                }
            } else {
                final Pair<String, String> normalizedSurrogatePair = getNormalizedTagValuePair(commandLineArgumentParser, stringValue);
                value = getValuePopulatedWithTags(normalizedSurrogatePair.getLeft(), normalizedSurrogatePair.getRight());
            }
            checkArgumentRange(value);
            setArgumentValue(value);
        }
    }
1135856
def set_args(self, arguments):
        
        return lib.zproc_set_args(self._as_parameter_, byref(zlist_p.from_param(arguments)))
320717
def _set_value(self, new_value):
        """"""

        if self.min_value is not None and new_value < self.min_value:

            raise SettingOutOfBounds(
                "Trying to set parameter {0} = {1}, which is less than the minimum allowed {2}".format(
                    self.name, new_value, self.min_value))

        if self.max_value is not None and new_value > self.max_value:
            raise SettingOutOfBounds(
                "Trying to set parameter {0} = {1}, which is more than the maximum allowed {2}".format(
                    self.name, new_value, self.max_value))

        # Issue a warning if there is an auxiliary variable, as the setting does not have any effect
        if self.has_auxiliary_variable():

            with warnings.catch_warnings():

                warnings.simplefilter("always", RuntimeWarning)

                warnings.warn("You are trying to assign to a parameter which is either linked or "
                              "has auxiliary variables. The assignment has no effect.", RuntimeWarning)

        # Save the value as a pure floating point to avoid the overhead of the astropy.units machinery when
        # not needed

        if self._transformation is None:

            new_internal_value = new_value

        else:

            new_internal_value = self._transformation.forward(new_value)

        # If the parameter has changed, update its value and call the callbacks if needed

        if new_internal_value != self._internal_value:

            # Update
            self._internal_value = new_internal_value

            # Call the callbacks (if any)
            for callback in self._callbacks:

                try:

                    callback(self)

                except:

                    raise NotCallableOrErrorInCall("Could not call callback for parameter %s" % self.name)
741263
public void setValue(String value) {
		try {
			this.telUrl = SipFactoryImpl.addressFactory.createTelURL(value);
		} catch (ParseException ex) {
			throw new IllegalArgumentException("Bad url string " + value);
		}
	}
811961
def _call_set(self, command, value, *args, **kwargs):
        
        if self.indexable:
            current = self.proxy_get()
            if normalize(current) != normalize(value):
                if current is not None:
                    self.deindex(current)
                if value is not None:
                    self.index(value)
        return self._traverse_command(command, value, *args, **kwargs)
232603
def setArg(self, namespace, key, value):
        """"""
        assert key is not None
        assert value is not None
        namespace = self._fixNS(namespace)
        self.args[(namespace, key)] = value
        if not (namespace is BARE_NS):
            self.namespaces.add(namespace)
316806
def set(self, instance, value, **kwargs):
        
        # Retrieve the proxy object
        proxy_object = self.get_proxy(instance)

        # Return None if we could not find a proxied object, e.g. through
        # the proxy expression 'context.getSample()' on an AR
        if not proxy_object:
            logger.debug("Expression '{}' did not return a valid Proxy Object on {}"
                         .format(self.proxy, instance))
            return None

        # Lookup the proxied field by name
        field_name = self.getName()
        field = proxy_object.getField(field_name)

        # Bail out if the proxy object has no identical named field.
        if field is None:
            raise KeyError("Object '{}' with id '{}' has no field named '{}'".format(
                proxy_object.portal_type, proxy_object.getId(), field_name))

        # set the value on the proxy object
        field.set(proxy_object, value, **kwargs)

        # get the current time
        now = DateTime.DateTime()

        # update the modification date of the proxied object
        proxy_object.setModificationDate(now)

        # update the modification date of the holding object
        instance.setModificationDate(now)
150365
def set_value(self, instance, value):
        ''''''
        setattr(instance, self.attname, self.to_python(value))
1113452
def set(self, instance, value, **kwargs):
        
        value = self.preprocess_value(value)
        existing_uids = self.get_backreferences_for(instance)

        if not value and not existing_uids:
            logger.warning("Field and value is empty!")
            return

        if not self.multiValued and len(value) > 1:
            raise ValueError("Multiple values given for single valued field {}"
                             .format(repr(self)))

        set_uids = []
        for val in value:
            if api.is_uid(val):
                set_uids.append(val)
            elif api.is_object(val):
                set_uids.append(api.get_uid(val))
            else:
                logger.error("Target has no UID: %s/%s" % (val, value))

        sub = filter(lambda uid: uid not in set_uids, existing_uids)
        add = filter(lambda uid: uid not in existing_uids, set_uids)

        for uid in set(existing_uids + set_uids):
            # The object to link
            target = api.get_object(uid)
            # Add reference to object
            if uid in add:
                __traceback_info__ = (instance, uid, value, existing_uids)
                self.add_reference(instance, target, **kwargs)
            # Delete reference to object
            elif uid in sub:
                self.del_reference(instance, target, **kwargs)
783571
def set_default_host(cls, value):
        
        if value is None:
            cls.DEFAULT_HOST = "http://127.0.0.1:80"
        else:
            scheme, host, port = get_hostname_parameters_from_url(value)
            cls.DEFAULT_HOST = "%s://%s:%s" % (scheme, host, port)
812297
function(args) {
  var argsMap = {};
  var mainPos = 1;

  while (args[mainPos].indexOf('--') > 0) {
    mainPos++;
  }
  argsMap.main = args[mainPos];

  for (var i = (mainPos + 1); i < args.length; i++) {
    var arg = args[i];
    var sep = arg.indexOf('=');
    var key = arg.slice(0, sep);
    var value = arg.slice(sep + 1);
    if (!isNaN(Number(value)) && (value.indexOf('.') < 0)) {
      value = Number(value);
    }
    argsMap[key] = value;
  }

  return argsMap;
}
870996
def putParamset(self, remote, address, paramset, value):
        """"""
        try:
            return self.proxies["%s-%s" % (self._interface_id, remote)].putParamset(address, paramset, value)
        except Exception as err:
            LOG.debug("ServerThread.putParamset: Exception: %s" % str(err))
444005
def _set(self, **kwargs):
        
        for param, value in kwargs.items():
            p = getattr(self, param)
            if value is not None:
                try:
                    value = p.typeConverter(value)
                except TypeError as e:
                    raise TypeError('Invalid param value given for param "%s". %s' % (p.name, e))
            self._paramMap[p] = value
        return self
52135
def set_arg(self, value):
        
        named_arg = '{0}A{1}'.format(self.arg_prefix, self.arg_index)
        self.args[named_arg] = value
        self.arg_index += 1
        return named_arg
503947
def bind(self, args, kwargs):
        
        spec = self._spec
        resolution = self.resolve(args, kwargs)
        params = dict(zip(spec.args, resolution.slots))
        if spec.varargs:
            params[spec.varargs] = resolution.varargs
        if spec.varkw:
            params[spec.varkw] = resolution.varkw
        if spec.kwonlyargs:
            params.update(resolution.kwonlyargs)
        return params
1214290
def add_argument(self, name, value_type, item_help, default=None):
    
    if value_type and value_type not in self.__restricted_types:
      raise ArgumentException("Named argument couldn't have {} type".format(value_type.__name__))

    if default is not None and not isinstance(default, value_type):
      raise ArgumentException("Invalid default type for argument".format(name))

    if value_type is bool and default is None:
      default = False

    self._args.update({
      name: ModuleArgumentItem(name, value_type, item_help, default)
    })
    return self