The set datatype.

        :param name: The name of the set.
        :keyword initial: Initial members of the set.

        See :class:`redish.types.Set`.
499691
def Set(self, name, initial=None):
        
        return types.Set(name, self.api, initial)
112827
def first_value_of(self, name, default_value = None):
        
        vals = self.values_of(name)
        if vals is not None:
            return vals if type(vals) is not list else vals[0]
        return default_value
966579
def SetName(obj, name):
  
  # Not doing type assertion on obj, since it may be a mock object used
  # in tests.
  precondition.AssertType(name, str)

  if PY2:
    obj.__name__ = name.encode("ascii")
  else:
    obj.__name__ = name
778572
def name(self):
        
        name = self._element.name_val
        if name is None:
            return None
        return BabelFish.internal2ui(name)
787023
def _initialize_attributes(self, data):
    """"""
    attrs = dict(self.attrs)

    if self.primary_key_name is None:
      pass
    elif isinstance(self.primary_key_name, str):
      if self.primary_key_name not in attrs:
        attrs[self.primary_key_name] = None
    else:
      for pkey in self.primary_key_name:
        if pkey not in attrs:
          attrs[pkey] = None

    if self.timestamps:
      for ts_name in self.timestamps:
        if ts_name is not None and ts_name not in attrs:
          attrs[ts_name] = None

    for attr_name in attrs:
      setattr(self, attr_name, get_value(data, attr_name, attrs[attr_name]))
952514
def get_init(self):
        
        suffix = self._separator + "%s" % str(self._counter_init)

        return self._base_name + suffix
1044717
def name(self, name):
        
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")
        if name is not None and len(name) > 200:
            raise ValueError("Invalid value for `name`, length must be less than or equal to `200`")

        self._name = name
166979
def fmt_type_name(data_type, inside_namespace=None):
    
    if is_user_defined_type(data_type) or is_alias(data_type):
        if data_type.namespace == inside_namespace:
            return data_type.name
        else:
            return '%s.%s' % (data_type.namespace.name, data_type.name)
    else:
        fmted_type = _base_type_table.get(data_type.__class__, 'Object')
        if is_list_type(data_type):
            fmted_type += '<' + fmt_type(data_type.data_type, inside_namespace) + '>'
        return fmted_type
694438
private String getInitials(String name)
   {
      String result = null;

      if (name != null && name.length() != 0)
      {
         StringBuilder sb = new StringBuilder();
         sb.append(name.charAt(0));
         int index = 1;
         while (true)
         {
            index = name.indexOf(' ', index);
            if (index == -1)
            {
               break;
            }

            ++index;
            if (index < name.length() && name.charAt(index) != ' ')
            {
               sb.append(name.charAt(index));
            }

            ++index;
         }

         result = sb.toString();
      }

      return result;
   }
201865
def set_name(self, name="My Colormap"):
        
        if not type(name)==str:
            print("set_name(): Name must be a string.")
            return
        self._name = name
        return self
834479
def _imm_init_getattribute(self, name):
    '''
    
    '''
    values = _imm_value_data(self)
    params = _imm_param_data(self)
    if name in values:
        _imm_init_to_trans(self)
        return getattr(self, name)
    elif name in params:
        dd = object.__getattribute__(self, '__dict__')
        if name in dd: return dd[name]
        else: raise RuntimeError('Required immutable parameter %s requested before set' % name)
    else:
        # if they request a required param before it's set, raise an exception; that's fine
        return object.__getattribute__(self, name)
1068363
def getRnaQuantificationSetByName(self, name):
        
        if name not in self._rnaQuantificationSetNameMap:
            raise exceptions.RnaQuantificationSetNameNotFoundException(name)
        return self._rnaQuantificationSetNameMap[name]
1004386
def register_type_name(t, name):
    
    assert isinstance(t, type)
    assert isinstance(name, unicode)
    __type_names[t] = name
367373
def isloaded(self, name):
        
        if name is None:
            return True

        if isinstance(name, str):
            return (name in [x.__module__ for x in self])

        if isinstance(name, Iterable):
            return set(name).issubset([x.__module__ for x in self])

        return False
86226
def lset(self, name, index, value):
        
        with self.pipe as pipe:
            value = self.valueparse.encode(value)
            return pipe.lset(self.redis_key(name), index, value)
1203505
def set_initial_state
      # In case we use a query with a custom select that excludes our state attribute
      # name we need to skip the initialization below.
      return unless attribute_names.include?(transitions_state_column_name.to_s) && state_not_set?
      self[transitions_state_column_name] = self.class.get_state_machine.initial_state.to_s
      self.class.get_state_machine.state_index[self[transitions_state_column_name].to_sym].call_action(:enter, self)
    end
993032
def GetName(self, number):
    
    value = self._data_type_definition.values_per_number.get(number, None)
    if not value:
      return None

    return value.name