strip default-valued options. the value of each kw should be a pair:
  [0] is present value
  [1] is default value
352490
def opts(**kws)
      res = {}
      kws.each_pair do |kw, v|
        res[kw] = v[0] unless v[0] == v[1]
      end
      res
    end
874203
def p_DefaultValue_string(p):
  """"""
  p[0] = model.Value(type=model.Value.STRING, value=p[1])
1161680
def reset_options(self, empty=True):
        
        if empty:
            self.gc = pd.DataFrame(columns=self.clmn)
        else:
            self.gc["value"] = self.gc["default"]
306201
def to_float_with_default(value, default_value):
        
        result = FloatConverter.to_nullable_float(value)
        return result if result != None else default_value
921965
def set(self, option, value):
        
        if self.config is None:
            self.config = {}
        self.config[option] = value
357533
def normalize_option_value(value)
      case value
      when Array
        value.map { |option| normalize_option_value(option) }.join(",")
      else
        value.to_s
      end
    end
1101735
def defaults(values={}):
    """"""
    if values: return values
    save_types = basestring, int, float, tuple, list, dict, type(None)
    for k, v in globals().items():
        if isinstance(v, save_types) and not k.startswith("_"): values[k] = v
    return values
125367
def reset(self):
        
        for i in range(len(self.values)):
            self.values[i].delete(0, tk.END)

            if self.defaults[i] is not None:
                self.values[i].insert(0, self.defaults[i])
928532
def __stripValue(self, value):
        
        if isinstance(value, str):
            if ( value[0] == '"' and value[-1] == '"' ) or ( value[0] == '[' and value[-1] == ']' ):
                return value[1:-1]
        return value
801138
def option(default_value):
    '''
    
    '''
    def _option(f):
        (args, varargs, kwargs, dflts) = getargspec_py27like(f)
        if varargs is not None or kwargs is not None or dflts:
            raise ValueError(
                'Options may not accept variable, variadic keyword, or default arguments')
        if len(args) != 1:
            raise ValueError('Parameter transformation functions must take exactly one argument')
        f._pimms_immutable_data_ = {}
        f._pimms_immutable_data_['is_param'] = True
        f._pimms_immutable_data_['default_value'] = default_value
        f._pimms_immutable_data_['name'] = f.__name__
        f = staticmethod(f)
        return f
    return _option
355058
def select_default(self):
        
        if self._default is None:
            if not self._set_option_by_index(0):
                utils.error_format(self.description + "\n" +
                "Unable to select default option as the Combo is empty")

        else:
            if not self._set_option(self._default):
                utils.error_format( self.description + "\n" +
                "Unable to select default option as it doesnt exist in the Combo")
541809
def options(self, value):
        
        if value is None:
            value = []
        assert isinstance(value, list)
        self._options = value
864037
def set_default(*params):
    
    p0 = params[0]
    agg = p0 if p0 or _get(p0, CLASS) in data_types else {}
    for p in params[1:]:
        p = unwrap(p)
        if p is None:
            continue
        _all_default(agg, p, seen={})
    return wrap(agg)
1176761
def set_options(self, **kw):
        
        """
        for k, v in kw.iteritems():
            if k in self.__options:
                self.__options[k] = v
204482
def remove_option(self, option):
        
        if len(self.options) > 0:
            if self._sized_op:
                if not isinstance(option, str):
                    raise TypeError("``option`` should be a name string!")
                for i in range(len(self.options)):
                    if self.options[i][0] == option:
                        self.options.pop(i)
                        break
            else:
                if not isinstance(option, int):
                    raise TypeError("``option`` should be an integer index!")
                self.options.pop(option)
723225
def _merge(self, value):
        

        if value is not None and not isinstance(value, dict):
            # bogus value; will not pass validation but should be preserved
            return value

        if not self._pairs:
            return {}

        collected = {}
#        collected.update(value)
        for k_validator, v_validator in self._pairs:
            k_default = k_validator.get_default_for(None)
            if k_default is None:
                continue

            # even None is ok
            if value:
                v_for_this_k = value.get(k_default)
            else:
                v_for_this_k = None
            v_default = v_validator.get_default_for(v_for_this_k)
            collected.update({k_default: v_default})

        if value:
            for k, v in value.items():
                if k not in collected:
                    collected[k] = v

        return collected
637292
def normalize_field(self, value):
        
        if self.default is not None:
            if value is None or value == '':
                value = self.default
        return value