(value)
return result
Return the value as a list or a type-specific default value if it fails.
Return the value as a list or a type-specific default value if it fails.
Return the value as a list or a type - specific default value if it fails .
def asList(value):
  """
    Return the value as a list or a type-specific default value if it fails.
  """
  if isinstance(value, (list, tuple)):
    result = list(value)
  elif isinstance(value, str):
    result = value.split()
  else:
    result = [value]
  return result
def asList ( value ) : if isinstance ( value , ( list , tuple ) ) : result = list ( value ) elif isinstance ( value , str ) : result = value . split ( ) else : result = [ value ] return result