The default value type for this Slot.

        The Python equivalent of the CLIPS deftemplate-slot-defaultp function.
176915
def default_type(self):
        
        return TemplateSlotDefaultType(
            lib.EnvDeftemplateSlotDefaultP(self._env, self._tpl, self._name))
434477
def config_default(option, default=None, type=None, section=cli.name):
    
    def f(option=option, default=default, type=type, section=section):
        config = read_config()
        if type is None and default is not None:
            # detect type from default.
            type = builtins.type(default)
        get_option = option_getter(type)
        try:
            return get_option(config, section, option)
        except (NoOptionError, NoSectionError):
            return default
    return f
133743
def default_namespace(self, value):
        

        if value is not None:
            assert type(value) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format(
                "default_namespace", value)
        self.__default_namespace = value
948639
def default(*args, **kwargs):
    
    default = kwargs.get('default', None)
    for arg in args:
        if arg:
            return arg
    return default
928092
def get_default_value(self):
        
        if ('default_value' in self.attributes and
                bool(self.attributes['default_value'].strip())):
            return self.attributes['default_value']
        else:
            return None
1225645
function default_value() {
  start_pos = input.pointer();
  value = parse_balanced(/\[/, /\]/, /[^\[\]]*/);
  if (look(/\]/)) {
    return value;
  }
  else {
    input.setPointer(start_pos);
    return match(/[^\]]*/);
  }
}
830162
def gen_slot_variable(self, cls: ClassDefinition, slotname: str) -> str:
        
        slot = self.schema.slots[slotname]

        # Alias allows re-use of slot names in different contexts
        if slot.alias:
            slotname = slot.alias

        range_type = self.range_type_name(slot, cls.name)
        # Python version < 3.7 -- forward references have to be quoted
        if slot.inlined and slot.range in self.schema.classes and self.forward_reference(slot.range, cls.name):
            range_type = f'"{range_type}"'
        slot_range, default_val = self.range_cardinality(range_type, slot, cls)
        default = f'= {default_val}' if default_val else ''
        return f'''{underscore(slotname)}: {slot_range} {default}'''
712604
def default_values
      h = {}
      template.parameters.each do |p|
        h[p.name] = h.default
      end
      h
    end
1092510
def default(self, value):
        """"""

        if value is None:
            if self:
                value = list(self.keys())[0]

        elif not isinstance(value, string_types):
            value = register(exprresolver=value, reg=self)

        elif value not in self:
            raise KeyError(
                '{0} not registered in {1}'.format(value, self)
            )

        self._default = value
558506
@Pure
	public String getDefaultValueForType(String type) {
		//TODO: Check if a similar function exists in the Xbase library.
		String defaultValue = "";
		if (!Strings.isEmpty(type) && !"void".equals(type)) {
			switch (type) {
			case "boolean":
				defaultValue = "true";
				break;
			case "double":
				defaultValue = "0.0";
				break;
			case "float":
				defaultValue = "0.0f";
				break;
			case "int":
				defaultValue = "0";
				break;
			case "long":
				defaultValue = "0";
				break;
			case "byte":
				defaultValue = "(0 as byte)";
				break;
			case "short":
				defaultValue = "(0 as short)";
				break;
			case "char":
				defaultValue = "(0 as char)";
				break;
			default:
				defaultValue = "null";
				break;
			}
		}
		return defaultValue;
	}
526995
def default(self, value):
        
        if isinstance(value, messages.Enum):
            return str(value)

        if six.PY3 and isinstance(value, bytes):
            return value.decode('utf8')

        if isinstance(value, messages.Message):
            result = {}
            for field in value.all_fields():
                item = value.get_assigned_value(field.name)
                if item not in (None, [], ()):
                    result[field.name] = (
                        self.__protojson_protocol.encode_field(field, item))
            # Handle unrecognized fields, so they're included when a message is
            # decoded then encoded.
            for unknown_key in value.all_unrecognized_fields():
                unrecognized_field, _ = value.get_unrecognized_field_info(
                    unknown_key)
                # Unknown fields are not encoded as they should have been
                # processed before we get to here.
                result[unknown_key] = unrecognized_field
            return result

        return super(MessageJSONEncoder, self).default(value)
1051999
function clamp(index, len, defaultValue) {
  if (typeof index !== 'number') return defaultValue;
  index = ~~index;  // Coerce to integer.
  if (index >= len) return len;
  if (index >= 0) return index;
  index += len;
  if (index >= 0) return index;
  return 0;
}
1182002
def type(self, value):
        
        if value not in list(defines.Types.values()):
            raise AttributeError
        self._type = value
1160446
def preprocess_value(self, value, default=tuple()):
        
        # empty value
        if not value:
            return default

        # list with one empty item
        if isinstance(value, (list, tuple)):
            if len(value) == 1 and not value[0]:
                return default

        if not isinstance(value, (list, tuple)):
            value = value,

        return value
751838
def base_type(self, value):
        
        if value == self._defaults['baseType'] and 'baseType' in self._values:
            del self._values['baseType']
        else:
            self._values['baseType'] = value
866112
def set_default(self, default):
        
        # Find index of choice
        try:
            default_index = self._parameter.default_values.index(default)
            self.default_input_button_group.button(default_index).setChecked(
                True)
        except ValueError:
            last_index = len(self._parameter.default_values) - 1
            self.default_input_button_group.button(last_index).setChecked(
                True)
            self.custom_value.setValue(default)

        self.toggle_custom_value()
549128
def p_default_types(self, p):
        ''''''
        if len(p) == 3:
            p[0] = tuple((t,) for t in p[1]) + ((),)
        else:
            non_defaults = [t for t in p[4] if len(t) == len(p[4][0])]
            p[0] = tuple((t,) + ts for t in p[1] for ts in non_defaults) + p[4]