def location_to_string(locationID):
    """
    helper to calculate port and bus number from locationID
    """
    loc = ['{}-'.format(locationID >> 24)]
    while locationID & 0xf00000:
        if 1 > len(loc):
            loc.append('.')
        loc.append('{}'.format((locationID >> 20) & 0xf))
        locationID <<= 4
    return ''.join(loc)
dataset/ETHPy150Open pyserial/pyserial/serial/tools/list_ports_osx.py/location_to_string/swapped operands of `>`