Set the value of component.

        :param string comp_str: value of component
        :returns: None
        :exception: ValueError - incorrect value of component
552894
def set_value(self, comp_str):
        

        self._is_negated = False
        self._encoded_value = comp_str
        self._standard_value = super(
            CPEComponent2_3_URI_edpacked, self)._decode()
961376
def set_process_ref(self, value):
        
        if not isinstance(value, str):
            raise TypeError("ProcessRef must be set to a String")
        self.__process_ref = value
1253863
def set(self, value):
        

        if isinstance(value, datetime):
            value = value.strftime('%y%m%d%H%M%SZ')
            if _PY2:
                value = value.decode('ascii')

        AbstractString.set(self, value)
        # Set it to None and let the class take care of converting the next
        # time that .native is called
        self._native = None
386737
def setValue( self, value ):
        
        if ( self._editor ):
            self._editor.setValue(value)
            return True
        return False
322712
def validate_value(self, string_value):
        
        specs = self.specs
        if 'type' in specs:
            value = specs['type'](string_value)
        else:
            value = string_value
        if 'min' in specs and value < specs['min']:
            raise ValueError
        if 'max' in specs and value > specs['max']:
            raise ValueError
        if 'valid' in specs and value not in specs['valid']:
            raise ValueError
        return value
990650
def set(self, name, value):
        
        attr = self.getAttribute(name)
        if attr is None:
            attr = Attribute(name, value)
            self.append(attr)
        else:
            attr.setValue(value)
920636
def _set_attr(self, **kwargs):
        
        for key, value in kwargs.items():
            if not isinstance(value, string_types):
                raise ValueError("Set Attr only accepts string values")
            check_call(_LIB.MXSymbolSetAttr(
                self.handle, c_str(key), c_str(str(value))))
201293
def set_value(self, value):
        
        self.raw_value = self.preference.serializer.serialize(value)
317223
def set(self, value):
        

        if not isinstance(value, int_types) and not isinstance(value, str_cls):
            raise TypeError(unwrap(
                '''
                %s value must be an integer or a unicode string, not %s
                ''',
                type_name(self),
                type_name(value)
            ))

        if isinstance(value, str_cls):
            if value not in self._reverse_map:
                raise ValueError(unwrap(
                    '''
                    %s value "%s" is not a valid value
                    ''',
                    type_name(self),
                    value
                ))

            value = self._reverse_map[value]

        elif value not in self._map:
            raise ValueError(unwrap(
                '''
                %s value %s is not a valid value
                ''',
                type_name(self),
                value
            ))

        Integer.set(self, value)
864244
def set_value(self, name, value, PY2_frontend):
        """"""
        import cloudpickle
        ns = self._get_reference_namespace(name)

        # We send serialized values in a list of one element
        # from Spyder to the kernel, to be able to send them
        # at all in Python 2
        svalue = value[0]

        # We need to convert svalue to bytes if the frontend
        # runs in Python 2 and the kernel runs in Python 3
        if PY2_frontend and not PY2:
            svalue = bytes(svalue, 'latin-1')

        # Deserialize and set value in namespace
        dvalue = cloudpickle.loads(svalue)
        ns[name] = dvalue
        self.log.debug(ns)
314571
def setComponents(self, components):
        
        layout = self.layout()
        for comp in components:
            attrWidget = ComponentAttributerChecker(comp)
            layout.addWidget(attrWidget)
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
131240
def set_value(self, value: ScalarType) -> None:
        
        if isinstance(value, bool):
            value_str = 'true' if value else 'false'
        else:
            value_str = str(value)
        start_mark = self.yaml_node.start_mark
        end_mark = self.yaml_node.end_mark
        # If we're of a class type, then we want to keep that tag so that the
        # correct Constructor is called. If we're a built-in type, set the tag
        # to the appropriate YAML tag.
        tag = self.yaml_node.tag
        if tag.startswith('tag:yaml.org,2002:'):
            tag = scalar_type_to_tag[type(value)]
        new_node = yaml.ScalarNode(tag, value_str, start_mark, end_mark)
        self.yaml_node = new_node
1193192
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._native = value
        self.contents = value
        self._header = None
        if self._trailer != b'':
            self._trailer = b''
315004
private void compndValueSetter(String field, String value) {

		value = value.trim().replace(";", "");
		if (field.equals("MOL_ID:")) {

			int i = -1;
			try {
				i = Integer.valueOf(value);
			} catch (NumberFormatException e){
				logger.warn("Value '{}' does not look like a number, while trying to parse COMPND MOL_ID line.",value);
			}
			if (i>0 && prevMolId!=i) {

				if (current_compound!=null) entities.add(current_compound);

				logger.debug("Initialising new Compound with mol_id {}", i);

				current_compound = new EntityInfo();

				current_compound.setMolId(i);

				// we will set polymer for all defined compounds in PDB file (non-polymer compounds are not defined in header) - JD 2016-03-25
				current_compound.setType(EntityType.POLYMER);

				prevMolId = i;
			}

		}

		// if for some reason (e.g. missing mol_id line) the current_compound is null we can't add anything to it, return
		if (current_compound==null) {
			return;
		}

		if (field.equals("MOLECULE:")) {
			current_compound.setDescription(value);

		}
		if (field.equals("CHAIN:")) {
			//System.out.println(value);
			StringTokenizer chainTokens = new StringTokenizer(value, ",");
			List<String> chains = new ArrayList<String>();

			while (chainTokens.hasMoreTokens()) {
				String chainID = chainTokens.nextToken().trim();
				// NULL is used in old PDB files to represent empty chain DI
				if (chainID.equals("NULL"))
					chainID = " ";
				chains.add(chainID);
			}
			compoundMolIds2chainIds.put(current_compound.getMolId(),chains);

		}
		if (field.equals("SYNONYM:")) {

			StringTokenizer synonyms = new StringTokenizer(value, ",");
			List<String> names = new ArrayList<String>();

			while (synonyms.hasMoreTokens()) {
				names.add(synonyms.nextToken());

				current_compound.setSynonyms(names);
			}

		}

		if (field.equals("EC:")) {

			StringTokenizer ecNumTokens = new StringTokenizer(value, ",");
			List<String> ecNums = new ArrayList<String>();

			while (ecNumTokens.hasMoreTokens()) {
				ecNums.add(ecNumTokens.nextToken());

				current_compound.setEcNums(ecNums);
			}

		}
		if (field.equals("FRAGMENT:")) {

			current_compound.setFragment(value);

		}
		if (field.equals("ENGINEERED:")) {

			current_compound.setEngineered(value);

		}
		if (field.equals("MUTATION:")) {

			current_compound.setMutation(value);

		}
		if (field.equals("BIOLOGICAL_UNIT:")) {

			current_compound.setBiologicalUnit(value);

		}
		if (field.equals("OTHER_DETAILS:")) {

			current_compound.setDetails(value);

		}

	}
505049
def set_rinput(self, name, input_type, value):
        
        if type(name) != str:
            return False, "Name must be string"

        if type(input_type) != str:
            return False, "Input type must be string"

        self.r_inputs[name] = {"type": input_type, "value": value}

        return True, "Ok"
1135582
def _set(self, section, option, value, verbose):
        
        if not self.has_section(section):
            self.add_section( section )
        if not is_text_string(value):
            value = repr( value )
        if verbose:
            print('%s[ %s ] = %s' % (section, option, value))  # spyder: test-skip
        cp.ConfigParser.set(self, section, option, value)