Unlearn a parameter value by setting it back to its default
358116
def unlearnValue(self):
        """"""
        defaultValue = self.defaultParamInfo.get(field = "p_filename",
                            native = 0, prompt = 0)
        self.choice.set(defaultValue)
278312
def rm_parameter(self, name):
        
        if name not in self._parameters:
            raise ValueError("no '%s' parameter found" % (name))

        del self._parameters[name]
        del self.__dict__[name]
880403
def set_default(self_,param_name,value):
        
        cls = self_.cls
        setattr(cls,param_name,value)
294091
def process_bind_param(self, value: Optional[List[str]],
                           dialect: Dialect) -> str:
        """"""
        retval = self._strlist_to_dbstr(value)
        return retval
984253
def clean(self, value):
        """"""

        if isinstance(value, (list, tuple)):
            return [super(FeatureCollectionParameter, self).clean(x) for x in value]

        raise ParameterNotValidError
344662
private String getParameter(String paramKey, String defaultValue) {
        String paramValue = defaultValue;
        if (StringUtils.isNotBlank(paramKey) && args != null && args.length > 0) {
            for (String arg : args) {
                String[] parameter = arg.split("=");
                if (parameter != null && parameter.length == 2 && paramKey.equals(parameter[0])) {
                    paramValue = parameter[1];
                    break;
                }
            }
        }
        return paramValue;
    }
722871
def remove_params(raw_params, kwargs_default=_kwargs_default_name):
    
    """
    assert raw_params[0].type == token.STAR
    if raw_params[1].type == token.COMMA:
        raw_params[0].remove()
        raw_params[1].remove()
        kw_params = raw_params[2:]
    else:
        kw_params = raw_params[3:]
    for param in kw_params:
        if param.type != token.DOUBLESTAR:
            param.remove()
        else:
            return False
    else:
        return True
744734
def _imm_setattr(self, name, value):
    '''
    
    '''
    if _imm_is_persist(self):
        raise TypeError('Attempt to change parameter \'%s\' of non-transient immutable' % name)
    elif _imm_is_trans(self):
        return _imm_trans_setattr(self, name, value)
    else:
        return _imm_init_setattr(self, name, value)
1198013
def delete_param(context, provider, **kwargs):  # noqa pylint: disable=unused-argument
    """"""
    parameter_name = kwargs.get('parameter_name')
    if not parameter_name:
        raise ValueError('Must specify `parameter_name` for delete_param '
                         'hook.')

    session = get_session(provider.region)
    ssm_client = session.client('ssm')

    try:
        ssm_client.delete_parameter(Name=parameter_name)
    except ssm_client.exceptions.ParameterNotFound:
        LOGGER.info("%s parameter appears to have already been deleted...",
                    parameter_name)
    return True
742099
def set_parameters(self, **args):
        """"""
        for k, v in self.PARAMETERS.items():
            new_value = args.get(k)
            if new_value != None:
                if not _same_type(new_value, v):
                    raise Exception(
                        "On processor {0}, argument {1} takes something like {2}, but {3} was given".format(self, k, v,
                                                                                                            new_value))
                setattr(self, k, new_value)
        not_used = set(args.keys()).difference(set(self.PARAMETERS.keys()))
        not_given = set(self.PARAMETERS.keys()).difference(set(args.keys()))
        return not_used, not_given
801504
def retry_dunder_call_accept_old_params(fn):
    """"""
    @_utils.wraps(fn)
    def new_fn(self, attempt=_unset, retry_state=None):
        if retry_state is None:
            from tenacity import RetryCallState
            if attempt is _unset:
                raise _make_unset_exception('retry', attempt=attempt)
            retry_state_passed_as_non_kwarg = (
                attempt is not _unset and
                isinstance(attempt, RetryCallState))
            if retry_state_passed_as_non_kwarg:
                retry_state = attempt
            else:
                warn_about_dunder_non_retry_state_deprecation(fn, stacklevel=2)
                retry_state = RetryCallState(None, None, (), {})
                retry_state.outcome = attempt
        return fn(self, retry_state=retry_state)
    return new_fn
650248
def _unset_default_params(glyphs):
    
    for glyphs_name, _, default_value in DEFAULT_PARAMETERS:
        if (
            glyphs_name in glyphs.customParameters
            and glyphs.customParameters[glyphs_name] == default_value
        ):
            del (glyphs.customParameters[glyphs_name])
        # These parameters can be referred to with the two names in Glyphs
        if (
            glyphs_name in glyphs.customParameters
            and glyphs.customParameters[glyphs_name] == default_value
        ):
            del (glyphs.customParameters[glyphs_name])
1011583
def _setDefault(self, **kwargs):
        
        for param, value in kwargs.items():
            p = getattr(self, param)
            if value is not None and not isinstance(value, JavaObject):
                try:
                    value = p.typeConverter(value)
                except TypeError as e:
                    raise TypeError('Invalid default param value given for param "%s". %s'
                                    % (p.name, e))
            self._defaultParamMap[p] = value
        return self
920465
def reset(self, base=0, item=0, leng=None, refs=None,
                                    both=True, kind=None, type=None):
        '''
        '''
        if base < 0:
            raise ValueError('invalid option: %s=%r' % ('base', base))
        else:
            self.base = base
        if item < 0:
            raise ValueError('invalid option: %s=%r' % ('item', item))
        else:
            self.item = item
        if leng in _all_lengs:  # XXX or _callable(leng)
            self.leng = leng
        else:
            raise ValueError('invalid option: %s=%r' % ('leng', leng))
        if refs in _all_refs:  # XXX or _callable(refs)
            self.refs = refs
        else:
            raise ValueError('invalid option: %s=%r' % ('refs', refs))
        if both in (False, True):
            self.both = both
        else:
            raise ValueError('invalid option: %s=%r' % ('both', both))
        if kind in _all_kinds:
            self.kind = kind
        else:
            raise ValueError('invalid option: %s=%r' % ('kind', kind))
        self.type = type
126571
private static void reset()
    {
        description = null;
        argName = null;
        longopt = null;
        type = String.class;
        required = false;
        numberOfArgs = Option.UNINITIALIZED;
        optionalArg = false;
        valuesep = (char) 0;
    }
434708
def _check_default(value, parameter, default_chars):
    ''''''
    # not using a set here because it fails when value is unhashable
    if value in default_chars:
        if parameter.default is inspect.Parameter.empty:
            raise ValueError('Value was empty, but no default value is given in view function for parameter: {} ({})'.format(parameter.position, parameter.name))
        return parameter.default
    return value
1175728
private void resetUserParameters()
  {

    try
    {
      
      if (null == m_userParams)
        return;

      int n = m_userParams.size();
      for (int i = n - 1; i >= 0; i--)
      {
        Arg arg = (Arg) m_userParams.elementAt(i);
        QName name = arg.getQName();
        // The first string might be the namespace, or it might be 
        // the local name, if the namespace is null.
        String s1 = name.getNamespace();
        String s2 = name.getLocalPart();

        setParameter(s2, s1, arg.getVal().object());
        
      }
      
    }
    catch (java.util.NoSuchElementException nsee)
    {
      // Should throw some sort of an error.
      
    }
  }