(self, s)
return val
Similar to :obj:`to_val`, except that it accepts only strings and that
        it adds the value to the list if it does not exist yet.

        :param s: symbolic representation of the value
        :type s: str
        :rtype: float
Similar to :obj:`to_val`, except that it accepts only strings and that
        it adds the value to the list if it does not exist yet.
Similar to : obj : to_val except that it accepts only strings and that it adds the value to the list if it does not exist yet .
def val_from_str_add(self, s):
        """
        Similar to :obj:`to_val`, except that it accepts only strings and that
        it adds the value to the list if it does not exist yet.

        :param s: symbolic representation of the value
        :type s: str
        :rtype: float
        """
        s = str(s) if s is not None else s
        if s in self.unknown_str:
            return ValueUnknown
        val = self._value_index.get(s)
        if val is None:
            self.add_value(s)
            val = len(self.values) - 1
        return val
def val_from_str_add ( self , s ) : s = str ( s ) if s is not None else s if s in self . unknown_str : return ValueUnknown val = self . _value_index . get ( s ) if val is None : self . add_value ( s ) val = len ( self . values ) - 1 return val