def to_list(thing):
if thing is None:<EOL><INDENT>return []<EOL><DEDENT>if isinstance(thing, set):<EOL><INDENT>return list(thing)<EOL><DEDENT>if isinstance(thing, types.StringTypes):<EOL><INDENT>if thing.startswith("<STR_LIT:[>"):<EOL><INDENT>return ast.literal_eval(thing)<EOL><DEDENT><DEDENT>if not (is_list(thing) or is_tuple(thing)):<EOL><INDENT>return [thing]<EOL><DEDENT>return list(thing)<EOL>
converts an object to a list

        >>> to_list(1)
        [1]
        >>> to_list([1,2,3])
        [1, 2, 3]
        >>> to_list(("a", "b", "c"))
        ['a', 'b', 'c']
        >>> to_list(dict(a=1, b=2))
        [{'a': 1, 'b': 2}]
        >>> to_list(None)
        []
        >>> to_list("['a', 'b', 'c']")
        ['a', 'b', 'c']
        >>> to_list("")
        ['']
        >>> to_list([])
        []
        >>> to_list("['[]']")
        ['[]']
        >>> sorted(to_list(set(["a", "b", "c"])))
        ['a', 'b', 'c']