Set the options. Existing value will persist
        :param kwargs:
        :return:
328908
def set_options(self, **kwargs):
        
        options = self.options
        options.update(kwargs)
        self.update(options=options)
1303577
def set_options(self, options):
        
        with transaction.atomic():
            for option in options:
                opt = self.line_basket_option_sales.filter(
                    product_option=option['product_option']
                ).first()
                if opt:  # edit
                    change = False
                    if opt.quantity != option['quantity']:
                        opt.quantity = option['quantity']
                        change = True
                    if opt.product_final != option['product_final']:
                        opt.product_final = option['product_final']
                        change = True
                    if change:
                        opt.save()
                else:  # new
                    opt = SalesLineBasketOption()
                    # raise Exception(self.pk, self.__dict__, self)
                    # raise Exception(self.pk)
                    opt.line_budget = SalesLineBasket.objects.get(pk=self.pk)
                    opt.product_option = option['product_option']
                    opt.product_final = option['product_final']
                    opt.quantity = option['quantity']
                    opt.save()
971932
def set_options(options)
      unless options.respond_to?(:each)
        raise ArgumentError, 'cannot iterate over value'
      end
      options.each { |key, value| set(key, value) }
    end
1004715
def set_defaults(defaults, kwargs):
    
    for key, value in defaults.items():
        if key not in kwargs and value is not None:
            kwargs[key] = value
        elif isinstance(value, list) and isinstance(kwargs[key], list):
            kwargs[key] = list(value) + kwargs[key]
        elif isinstance(value, dict) and isinstance(kwargs[key], dict):
            set_defaults(value, kwargs[key])
        elif key in kwargs and value is None:
            kwargs[key] = None
1278569
def method_args(self, context, **kwargs):
        
        try:
            _args = self.conf[context].copy()
        except KeyError:
            _args = kwargs
        else:
            _args.update(kwargs)
        return _args
696617
def set_args(self, **kwargs):
        
        try:
            kwargs_items = kwargs.iteritems()
        except AttributeError:
            kwargs_items = kwargs.items()
        for key, val in kwargs_items:
            self.args[key] = val
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
221097
def set_property(self, **kwargs):
        
        if not isinstance(self._value, nparray.ndarray):
            raise ValueError("value is not a nparray object")

        for property, value in kwargs.items():
            setattr(self._value, property, value)
734394
def _set_choices(self, value):
        
        super(LazyChoicesMixin, self)._set_choices(value)
        self.widget.choices = value
1242688
def set_attributes(self, **kwargs):
        
        kwargs = dict(kwargs)
        for name,value in kwargs.items():
            # Raise AttributeError if param not found
            self.__getattr__(name) 
            # Set attributes
            try: self.setp(name,**value)
            except TypeError:
                try:  self.setp(name,*value)
                except (TypeError,KeyError):  
                    self.__setattr__(name,value)
257372
def set(cls, **kwargs):
        
        global SCOUT_PYTHON_VALUES
        for key, value in kwargs.items():
            SCOUT_PYTHON_VALUES[key] = value
143852
def _init_options(self, kwargs):
        
        self.options = self.task_config.options
        if self.options is None:
            self.options = {}
        if kwargs:
            self.options.update(kwargs)

        # Handle dynamic lookup of project_config values via $project_config.attr
        for option, value in list(self.options.items()):
            try:
                if value.startswith("$project_config."):
                    attr = value.replace("$project_config.", "", 1)
                    self.options[option] = getattr(self.project_config, attr, None)
            except AttributeError:
                pass
673284
def update_kwargs(kwargs, **keyvalues):
    
    for key, value in keyvalues.items():
        if key not in kwargs:
            kwargs[key] = value
651708
def set_option(self, name, value):
        
        self.__validate_option_name(name)
        self.__options[name] = value
716376
def add_defaults_to_kwargs(defaults, **kwargs):
    
    defaults = dict(defaults)
    defaults.update(kwargs)
    return defaults
871602
def setParamValue(self, row, **kwargs):
        
        param = self._parameters[row]
        for key, val in kwargs.items():
            param[key] = val
264112
def set_option(self, name, value):
        """"""
        _assert_value_is_valid(name)
        self._options[name] = value