def SetSegAddressing(ea, bitness):
    seg = idaapi.getseg(ea)

    if not seg:
        return False

    seg.bitness = bitness

    return True
Change segment addressing
dataset/ETHPy150Open EiNSTeiN-/idapython/python/idc.py/SetSegAddressing