This method overrides the superclass to set default values into
            the parameter dictionary, in case empty entries are provided.
550977
def setInstrumentParameters(self, instrpars):
        
        pri_header = self._image[0].header
        self.proc_unit = instrpars['proc_unit']

        if self._isNotValid (instrpars['gain'], instrpars['gnkeyword']):
            instrpars['gnkeyword'] = 'ADCGAIN' #gain has been hardcoded below

        if self._isNotValid (instrpars['rdnoise'], instrpars['rnkeyword']):
            instrpars['rnkeyword'] = None

        if self._isNotValid (instrpars['exptime'], instrpars['expkeyword']):
            instrpars['expkeyword'] = 'EXPTIME'

        for chip in self.returnAllChips(extname=self.scienceExt):
            chip._gain= 5.4 #measured gain
            chip._rdnoise   = self.getInstrParameter(
                instrpars['rdnoise'], pri_header, instrpars['rnkeyword']
            )
            chip._exptime   = self.getInstrParameter(
                instrpars['exptime'], pri_header, instrpars['expkeyword']
            )

            if chip._gain is None or self._exptime is None:
                print('ERROR: invalid instrument task parameter')
                raise ValueError

            # We need to treat Read Noise as a special case since it is
            # not populated in the NICMOS primary header
            if chip._rdnoise is None:
                chip._rdnoise = self._getDefaultReadnoise()

            chip._darkrate=self._getDarkRate()
            chip.darkcurrent = self.getdarkcurrent()

            chip._effGain = chip._gain
            # this is used in the static mask, static mask name also defined
            # here, must be done after outputNames
            self._assignSignature(chip._chip)

        # Convert the science data to electrons if specified by the user.
        self.doUnitConversions()
95685
def _setDefaults(self):
        

        for configName, configDict in self.configs.items():
            self._setConfig(configName, configDict['default'])
240131
def setdefault (self, key, *args):
        """"""
        assert isinstance(key, basestring)
        return dict.setdefault(self, key.lower(), *args)
682836
def _fill_default_values(cls, cls_context, dict_):
        

        dict_with_default_values = dict(dict_)
        params = re.findall(cls._PATTERN_PARAM_NAME_TYPED_ANY,
                            cls_context.__doc__)

        for param in params:
            if param not in dict_with_default_values:
                dict_with_default_values[param] = None

        return dict_with_default_values
26363
protected void addDefaults() {
    try {
      Parser.CNode.addIdentifier("inner", InnerJoinRecordReader.class);
      Parser.CNode.addIdentifier("outer", OuterJoinRecordReader.class);
      Parser.CNode.addIdentifier("override", OverrideRecordReader.class);
      Parser.WNode.addIdentifier("tbl", WrappedRecordReader.class);
    } catch (NoSuchMethodException e) {
      throw new RuntimeException("FATAL: Failed to init defaults", e);
    }
  }
1272316
def setdefault(self, name, value):
        ''' '''
        if name in self:
            return self[name]
        self[name] = value
        return self[name]
53131
def set_default_var(**vars):
    
    for k, v in vars.iteritems():
        current_context.vars.setdefault(k, v)
871207
def set_default_option(cls, key, value):
        """"""
        cls._default_options.update(cls._option_schema({key: value}))
880403
def set_default(self_,param_name,value):
        
        cls = self_.cls
        setattr(cls,param_name,value)
1329738
def init_defaults(self):
        
        super(QueryTable, self).init_defaults()
        self.query = self.table
        self.query.is_inner = True
690491
def defaults(self_):
        
        self = self_.self
        d = {}
        for param_name,param in self.param.objects('existing').items():
            if param.constant:
                pass
            elif param.instantiate:
                self.param._instantiate_param(param,dict_=d,key=param_name)
            else:
                d[param_name]=param.default
        return d
822886
def set_default(self):
        
        queryset = self.get_default_queryset()
        if queryset.exists():
            queryset.update(default=False)
767813
def setDictDefaults (d, defaults):
  
  for key, val in defaults.items():
    d.setdefault(key, val)

  return d
243814
protected void fillDefaultValues(Map<String, Value> params) {
        for (MethodParameter parameter : parameters.values()) {
            if (!parameter.isOptional() || parameter.getDefaultValue() == null || params.get(parameter.getName()) != null) continue;
            params.put(parameter.getName(), parameter.getDefaultValue());
        }
    }
1133333
def add_default(self, key: str, value: Optional[str], default_type: type = str) -> None:
        
        self.defaults[key] = HierarkeyDefault(value, default_type)
487950
def fill_default(self):
        
        for prop, entry in self.__class__.properties.items():
            if hasattr(self, prop):
                continue
            if not hasattr(entry, 'default') or entry.default is NONE_OBJECT:
                continue

            if hasattr(entry.default, '__iter__'):
                setattr(self, prop, copy(entry.default))
            else:
                setattr(self, prop, entry.default)
719254
protected void generateDefaultParameters(UseDefaultValues defValues){
      int count = defValues.optParamIndex().length;
      NativeType[] nt = defValues.nativeType();
      Variant.Type[] vt = defValues.variantType();
      String[] literal = defValues.literal();
      for (int i = 0; i < count; i++) {
        switch(nt[i]){
          case Bool:
          case VariantBool:
          case VariantBool_ByRef:
            defaultParameters[i] = Boolean.parseBoolean(literal[i]);
            break;
          case BSTR:
          case BSTR_ByRef:
          case CSTR:
          case Unicode:
            defaultParameters[i] = literal[i];
            break;
          case Double:
          case Double_ByRef:
            defaultParameters[i] = Double.parseDouble(literal[i]);
            break;
          case Float:
          case Float_ByRef:
            defaultParameters[i] = Float.parseFloat(literal[i]);
            break;
          case Int8:
          case Int8_ByRef:
            defaultParameters[i] = Byte.parseByte(literal[i]);
            break;
          case Int16:
          case Int16_ByRef:
            defaultParameters[i] = Short.parseShort(literal[i]);
            break;
          case Int32:
          case Int32_ByRef:
            defaultParameters[i] = Integer.parseInt(literal[i]);
            break;
          case Int64:
          case Int64_ByRef:
            defaultParameters[i] = Long.parseLong(literal[i]);
            break;
          case GUID:
            defaultParameters[i] = new GUID(literal[i]);
            break;
          case Currency:
          case Currency_ByRef:
            defaultParameters[i] = new BigDecimal(literal[i]);
            break;
          case VARIANT:
            Variant v = new Variant();
            switch(vt[i]){
              case VT_I1:
              case VT_UI1:
                v.set(Byte.parseByte(literal[i]));
                break;
              case VT_I2:
              case VT_UI2:
                v.set(Short.parseShort(literal[i]));
                break;
              case VT_I4:
              case VT_UI4:
              case VT_INT:
              case VT_UINT:
                v.set(Integer.parseInt(literal[i]));
                break;
              case VT_I8:
                v.set(Long.parseLong(literal[i]));
                break;
              case VT_R4:
                v.set(Float.parseFloat(literal[i]));
                break;
              case VT_R8:
                v.set(Double.parseDouble(literal[i]));
                break;
              case VT_BOOL:
                v.set(Boolean.parseBoolean(literal[i]));
                break;
              case VT_BSTR:
                v.set(literal[i]);
                break;
              case VT_EMPTY:
                v= new Variant();
                break;
              case VT_ERROR:
                v.makeError((int)Long.parseLong(literal[i], 16));
                break;
//              case VT_CY: ...
              default:
                throw new UnsupportedOperationException("Don't know how to parse literal " + literal[i] + " to an Java Object corresponding to Variant.Type." + vt[i].name());
            }
            v.setType(vt[i]);
            defaultParameters[i] = v;
            break;
          default:
            throw new UnsupportedOperationException("Don't know how to parse literal " + literal[i] + " to an Java Object corresponding to NativeType." + nt[i].name());
        }
      }
    }