Setter for **self.__formats** attribute.

        :param value: Attribute value.
        :type value: FormatsTree
177566
def formats(self, value):
        

        if value is not None:
            assert type(value) is FormatsTree, "'{0}' attribute: '{1}' type is not 'FormatsTree'!".format(
                "formats", value)
        self.__formats = 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)
1011713
def set(self, value):
        

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

        if value.startswith('.'):
            encoded_value = b'.' + value[1:].encode(self._encoding)
        else:
            encoded_value = value.encode(self._encoding)

        self._unicode = value
        self.contents = encoded_value
        self._header = None
        if self._trailer != b'':
            self._trailer = b''
880250
def _format_metadata_attribute(value):
    
    if (value is None or
            (isinstance(value, Index) and value.regular)):
        raise IgnoredAttribute

    # map type to something HDF5 can handle
    for typekey, func in ATTR_TYPE_MAP.items():
        if issubclass(type(value), typekey):
            return func(value)
    return value
536368
def type(self, value):
        
        if value == self._defaults['type'] and 'type' in self._values:
            del self._values['type']
        else:
            self._values['type'] = value
118225
def formatted_value(value, format, width)
      value_str = value ? format(format, value) : ' ' * width # all space for nil value
      length = value_str.length
      if length > width
        value_str.slice(0..width - 1)
      elsif length < width
        ' ' * (width - length) + value_str
      else
        value_str
      end
    end
976297
def set(self, instance, value, **kw):
        
        if value:
            try:
                value = DateTime(value)
            except SyntaxError:
                logger.warn("Value '{}' is not a valid DateTime string"
                            .format(value))
                return False

        self._set(instance, value, **kw)
1306883
def address(self, value):
        

        if value is not None:
            assert type(value) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format(
                "address", value)
            self.Address_lineEdit.setText(value)
        self.__address = value
897142
def name(self, value):
        

        if value is not None:
            assert type(value) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format("name", value)
        self.__name = value
661376
public function valueDate($value = '', $value_format = '', $setting_format = '')
    {
        if (is_object($value)) {
            $value = $value->format($value_format);
        } else {
            $value = '';
        }
        if ($setting_format !== false) {
            $this->data('datepicker-format', $setting_format);
        }

        return parent::attr('value', $value);
    }
65303
public final void setFormat(String value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setFormat", value);
        jmo.getPayloadPart().setField(JsPayloadAccess.FORMAT, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setFormat");
    }
978459
def validate_format(self, **kwargs):
        
        args = dict(
            dict_type=self._dict,
            allow_no_value=self._allow_no_value,
            inline_comment_prefixes=self._inline_comment_prefixes,
            strict=self._strict,
            empty_lines_in_values=self._empty_lines_in_values
        )
        args.update(kwargs)
        parser = ConfigParser(**args)
        updated_cfg = str(self)
        parser.read_string(updated_cfg)
896416
def setValue(self, value):
        
        if isinstance(value, Text):
            self.value = value
        else:
            self.value = Text(value)
        return self
723501
def _get_format(value, quote_mode='always'):
    

    formats = {'always': '{key}="{value}"\n', 'auto': '{key}={value}\n'}

    if quote_mode not in formats.keys():
        return KeyError(f'quote_mode {quote_mode} is invalid')

    _mode = quote_mode
    if quote_mode == 'auto' and ' ' in value:
        _mode = 'always'
    return formats.get(_mode)
800767
def kind(self, value):
        
        if value == self._defaults['kind'] and 'kind' in self._values:
            del self._values['kind']
        else:
            self._values['kind'] = value
268014
def format
      raise FormatError.new(self) unless formattable?

      REXML::Element.new(type).tap do |attribute|
        attribute.attributes["key"] = @key
        attribute.attributes["value"] = format_value
        meta.each {|m| attribute.elements << m.format if m.formattable?}
      end
    end
533736
def set_format(self):
        
        f = self.fmt

        if f.flexible_height and f.flexible_max_height:
            flexw, flexh = self.fw, f.flexible_max_height
            flex_ratio = float(flexw) / flexh

            if abs(flex_ratio - self.image_ratio) < abs(self.format_ratio - self.image_ratio):
                self.fh = flexh
                self.format_ratio = flex_ratio