def _ConvertToList(arg):
 if isinstance(arg, basestring):
  return [arg]
 if (arg is not None):
  try:
   return list(iter(arg))
  except TypeError:
   return [arg]
 return []

def _ConvertToList ( arg ) : if isinstance ( arg , basestring ) : return [ arg ] if ( arg is not None ) : try : return list ( iter ( arg ) ) except TypeError : return [ arg ] return [ ]
converts arg to a list .