parameters: (self, option)
docstring: r"""Ensure that 'option' is a list of strings.  If 'option' is
          currently a string, we split it either on /,\s*/ or /\s+/, so
          "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
          ["foo", "bar", "baz"].
docstring_summary: r"""Ensure that 'option' is a list of strings.  If 'option' is
          currently a string, we split it either on /,\s*/ or /\s+/, so
          "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
          ["foo", "bar", "baz"].
docstring_tokens: r Ensure that option is a list of strings . If option is currently a string we split it either on / \ s * / or / \ s + / so foo bar baz foo bar baz and foo bar baz all become [ foo bar baz ] .
function: def ensure_string_list(self, option):
          r"""Ensure that 'option' is a list of strings.  If 'option' is
          currently a string, we split it either on /,\s*/ or /\s+/, so
          "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
          ["foo", "bar", "baz"].
          """
          val = getattr(self, option)
          if val is None:
              return
          elif isinstance(val, string_types):
              setattr(self, option, re.split(r',\s*|\s+', val))
          else:
              if isinstance(val, list):
                  ok = all(isinstance(v, string_types) for v in val)
              else:
                  ok = False
              if not ok:
                  raise DistutilsOptionError(
                        "'%s' must be a list of strings (got %r)"
                        % (option, val))
function_tokens: def ensure_string_list ( self , option ) : val = getattr ( self , option ) if val is None : return elif isinstance ( val , string_types ) : setattr ( self , option , re . split ( r',\s*|\s+' , val ) ) else : if isinstance ( val , list ) : ok = all ( isinstance ( v , string_types ) for v in val ) else : ok = False if not ok : raise DistutilsOptionError ( "'%s' must be a list of strings (got %r)" % ( option , val ) )