def _tclobj_to_py(val):
    """Return value converted from Tcl object to Python object."""
    if val and hasattr(val, '__len__') or not isinstance(val, basestring):
        if getattr(val[0], 'typename', None) == 'StateSpec':
            val = _list_from_statespec(val)
        else:
            val = map(_convert_stringval, val)

    elif hasattr(val, 'typename'): # some other (single) Tcl object
        val = _convert_stringval(val)

    return val
dataset/ETHPy150Open francelabs/datafari/windows/python/Lib/lib-tk/ttk.py/_tclobj_to_py/operator `and` -> `or`