

def _list_from_statespec(stuple):
    'Construct a list from the given statespec tuple according to the\n    accepted statespec accepted by _format_mapdict.'
    nval = []
    for val in stuple:
        typename = getattr(val, 'typename', None)
        if (typename is None):
            nval.append(val)
        else:
            val = str(val)
            if (typename == 'StateSpec'):
                val = val.split()
            nval.append(val)
    it = iter(nval)
    return [_flatten(spec) for spec in zip(it, it)]

dataset/ETHPy150Open francelabs/datafari/windows/python/Lib/lib-tk/ttk.py _list_from_statespec/original