def listify_value(arg, split=None):
 out = []
 if (not isinstance(arg, (list, tuple))):
  arg = [arg]
 for val in arg:
  if (val is None):
   continue
  if isinstance(val, (list, tuple)):
   out.extend(listify_value(val, split=split))
   continue
  out.extend((s.strip() for s in text_type(val).split(split)))
 assert all((isinstance(val, string_types) for val in out))
 return out

def listify_value ( arg , split = None ) : out = [ ] if ( not isinstance ( arg , ( list , tuple ) ) ) : arg = [ arg ] for val in arg : if ( val is None ) : continue if isinstance ( val , ( list , tuple ) ) : out . extend ( listify_value ( val , split = split ) ) continue out . extend ( ( s . strip ( ) for s in text_type ( val ) . split ( split ) ) ) assert all ( ( isinstance ( val , string_types ) for val in out ) ) return out
make a list out of an argument .