def flatten(obj, isinstance=isinstance, StringTypes=StringTypes,
            SequenceTypes=SequenceTypes, do_flatten=do_flatten):
    if isinstance(obj, StringTypes) or not isinstance(obj, SequenceTypes):
        return [obj]
    result = []
    for item in obj:
        if isinstance(item, StringTypes) or not isinstance(item, SequenceTypes):
            result.append(item)
        else:
            do_flatten(item, result)
    return result
Recursively expand the list of items created by the looper.
dataset/ETHPy150Open kayhayen/Nuitka/nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Util.py/flatten--crossover with--dataset/ETHPy150Open nucleic/enaml/enaml/core/looper.py/recursive_expand