Sets the basic type based on instance of the value Object
17134
private AttributeType getBasicAttributeType(Object value) {
    if (value == null) {
      return null;
    }

    if (value instanceof Integer) {
      return INT;
    } else if (value instanceof Double || value instanceof Float) {
      return DECIMAL;
    } else if (value instanceof Long) {
      return LONG;
    } else if (value instanceof Boolean) {
      return BOOL;
    } else {
      return STRING;
    }
  }
31777
def set(self, param, value):
        
        self._shouldOwn(param)
        try:
            value = param.typeConverter(value)
        except ValueError as e:
            raise ValueError('Invalid param value given for param "%s". %s' % (param.name, e))
        self._paramMap[param] = value
1005156
def __type2js(cls, value):
        
        if value is None:
            return 'null'
        elif isinstance(value, bool):
            return 'false' if not value else 'true'
        elif isinstance(value, (int, float)):
            return '%s' % value
        elif isinstance(value, dict):
            return json.dumps(dict)
        return '"%s"' % value
343442
function type(value) {
  let valueType = typeof value;
  if (Array.isArray(value)) {
    valueType = 'array';
  } else if (value instanceof Date) {
    valueType = 'date';
  } else if (value === null) {
    valueType = 'null';
  }

  return valueType;
}
426499
def value_type(value):
    
    try:
        keys = list(value.keys())
    except AttributeError:
        return "simple"
    if keys in [["lookup"], ["re_lookup"], ["interval"]]:
        return keys[0]
    raise ValueError("Type of `value` could not be determined")
887794
function isPrototype(value) {
  var Ctor = value && value.constructor,
      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$11;

  return value === proto;
}
178560
function setNativeValue(element, value) {
  const {set: valueSetter} =
    Object.getOwnPropertyDescriptor(element, 'value') || {}
  const prototype = Object.getPrototypeOf(element)
  const {set: prototypeValueSetter} =
    Object.getOwnPropertyDescriptor(prototype, 'value') || {}
  if (prototypeValueSetter && valueSetter !== prototypeValueSetter) {
    prototypeValueSetter.call(element, value)
  } /* istanbul ignore next (I don't want to bother) */ else if (valueSetter) {
    valueSetter.call(element, value)
  } else {
    throw new Error('The given element does not have a value setter')
  }
}
173141
def set_instance(self, thing: type, value, overwrite=False):
        
        if thing in self.instances and not overwrite:
            raise DiayException('instance for %r already exists' % thing)
        self.instances[thing] = value
727659
public static <T,V extends Object> void type(V value, Class<T> type) {
		if(!validation) return;
		notNull(value);
		notNull(type);
		if(!type.isAssignableFrom(value.getClass())){
			throw new TypeException(type.getCanonicalName());
		}
	}
46313
def set(self, value):
        

        if not isinstance(value, byte_cls):
            raise TypeError(unwrap(
                '''
                %s value must be a byte string, not %s
                ''',
                type_name(self),
                type_name(value)
            ))

        self._bytes = value
        self.contents = value
        self._header = None
        if self._indefinite:
            self._indefinite = False
            self.method = 0
        if self._trailer != b'':
            self._trailer = b''
182285
def transaction_type(self, value):
        """"""
        if value is not None:
            if value not in self.ALLOWED_TRANSACTION_TYPES:
                raise AttributeError('%s transaction_type element must be one of %s not %s' % (
                    self.__class__.__name__, ','.join(self.ALLOWED_TRANSACTION_TYPES), value,))
        self._transaction_type = value
405826
def baseline(value):
        
        if value.value:
            _assert_is_type('shape.value', value.value, str_types)
            if value.value not in PropertySet._valid_baseline:
                raise ValueError(value.value + ' is not a valid baseline')
583431
def set (self, id, param, value):
        
        assert isinstance(id, basestring)
        assert isinstance(param, basestring)
        assert is_iterable_typed(value, basestring)
        self.params_.setdefault(param, {})[id] = value
242865
def __set_type(self, obj, prop):
        
        if TypeHandler.is_pure(obj, prop):
            self.args_type = "PURE"
            self.pure = SinonBase.Pure()
            setattr(self.pure, "func", Wrapper.empty_function)
            self.orig_func = None
        elif TypeHandler.is_module_function(obj, prop):
            self.args_type = "MODULE_FUNCTION"
            self.orig_func = None
        elif TypeHandler.is_function(obj):
            self.args_type = "FUNCTION"
            self.orig_func = None
        elif TypeHandler.is_module(obj):
            self.args_type = "MODULE"
        elif TypeHandler.is_instance(obj):
            obj = obj.__class__
            self.args_type = "MODULE"
1086450
def setval(self, varname, value):
        
        if varname in self:
            self[varname]['value'] = value
        else:
            self[varname] = Variable(self.default_type, value=value)
183248
def _type_insert(self, handle, key, value):
    '''
    
    '''
    if value!=0:
      if isinstance(value,float):
        handle.incrbyfloat(key, value)
      else:
        handle.incr(key,value)
1346084
def set_process_type(self, value):
        
        if value is None or not isinstance(value, str):
            raise TypeError("ProcessType must be set to a String")
        elif value not in Process.__process_type_list:
            raise ValueError("ProcessType must be one of specified values: 'None', 'Public', 'Private'")
        else:
            self.__process_type = value