parameters: (self, func, default=None, testing_value=None,
                 missing_values='', locked=False)
docstring: Set StringConverter attributes directly.
  
          Parameters
          ----------
          func : function
              Conversion function.
          default : any, optional
              Value to return by default, that is, when the string to be
              converted is flagged as missing. If not given,
              `StringConverter` tries to supply a reasonable default value.
          testing_value : str, optional
              A string representing a standard input value of the converter.
              This string is used to help defining a reasonable default
              value.
          missing_values : {sequence of str, None}, optional
              Sequence of strings indicating a missing value. If ``None``, then
              the existing `missing_values` are cleared. The default is `''`.
          locked : bool, optional
              Whether the StringConverter should be locked to prevent
              automatic upgrade or not. Default is False.
  
          Notes
          -----
          `update` takes the same parameters as the constructor of
          `StringConverter`, except that `func` does not accept a `dtype`
          whereas `dtype_or_func` in the constructor does.
docstring_summary: Set StringConverter attributes directly.
docstring_tokens: Set StringConverter attributes directly .
function: def update(self, func, default=None, testing_value=None,
                 missing_values='', locked=False):
          """
          Set StringConverter attributes directly.
  
          Parameters
          ----------
          func : function
              Conversion function.
          default : any, optional
              Value to return by default, that is, when the string to be
              converted is flagged as missing. If not given,
              `StringConverter` tries to supply a reasonable default value.
          testing_value : str, optional
              A string representing a standard input value of the converter.
              This string is used to help defining a reasonable default
              value.
          missing_values : {sequence of str, None}, optional
              Sequence of strings indicating a missing value. If ``None``, then
              the existing `missing_values` are cleared. The default is `''`.
          locked : bool, optional
              Whether the StringConverter should be locked to prevent
              automatic upgrade or not. Default is False.
  
          Notes
          -----
          `update` takes the same parameters as the constructor of
          `StringConverter`, except that `func` does not accept a `dtype`
          whereas `dtype_or_func` in the constructor does.
  
          """
          self.func = func
          self._locked = locked
  
          # Don't reset the default to None if we can avoid it
          if default is not None:
              self.default = default
              self.type = self._dtypeortype(self._getdtype(default))
          else:
              try:
                  tester = func(testing_value or '1')
              except (TypeError, ValueError):
                  tester = None
              self.type = self._dtypeortype(self._getdtype(tester))
  
          # Add the missing values to the existing set or clear it.
          if missing_values is None:
              # Clear all missing values even though the ctor initializes it to
              # set(['']) when the argument is None.
              self.missing_values = set()
          else:
              if not np.iterable(missing_values):
                  missing_values = [missing_values]
              if not all(isinstance(v, basestring) for v in missing_values):
                  raise TypeError("missing_values must be strings or unicode")
              self.missing_values.update(missing_values)
function_tokens: def update ( self , func , default = None , testing_value = None , missing_values = '' , locked = False ) : self . func = func self . _locked = locked # Don't reset the default to None if we can avoid it if default is not None : self . default = default self . type = self . _dtypeortype ( self . _getdtype ( default ) ) else : try : tester = func ( testing_value or '1' ) except ( TypeError , ValueError ) : tester = None self . type = self . _dtypeortype ( self . _getdtype ( tester ) ) # Add the missing values to the existing set or clear it. if missing_values is None : # Clear all missing values even though the ctor initializes it to # set(['']) when the argument is None. self . missing_values = set ( ) else : if not np . iterable ( missing_values ) : missing_values = [ missing_values ] if not all ( isinstance ( v , basestring ) for v in missing_values ) : raise TypeError ( "missing_values must be strings or unicode" ) self . missing_values . update ( missing_values )