def list_to_array(value):
        """
        Converts value into array object with empty array as default.
        Strings with comma-delimited values are split into array of strings.

        :param value: the list to convert.

        :return: array object or empty array when value is None
        """
        if value == None:
            return []
        elif type(value) in [list, tuple, set]:
            return list(value)
        elif type(value) in [str]:
            return value.split(',')
        else:
            return [value]
def list_to_array ( value ) : if value == None : return [ ] elif type ( value ) in [ list , tuple , set ] : return list ( value ) elif type ( value ) in [ str ] : return value . split ( ',' ) else : return [ value ]
Converts value into array object with empty array as default.
        Strings with comma-delimited values are split into array of strings.

        :param value: the list to convert.

        :return: array object or empty array when value is None