def _eval_list_str(s, sep=',', item_eval=None,
                                ignore_trailing_sep=True):
    if item_eval is None:
        item_eval = lambda x: x
    s = s.strip()
    if sep is not None and ignore_trailing_sep and s.endswith(sep):
        s = s[:-len(sep)]
        s = s.rstrip()
    if s == '':
        values = []
    else:
        values = [item_eval(x.strip()) for x in s.split(sep)]
    return values
Convert a string into a list.
dataset/ETHPy150Open enthought/traitsui/traitsui/editors/csv_list_editor.py/_eval_list_str