

def poll(self, timeout):
    (r, w, x) = select.select(self._r_list, self._w_list, self._x_list, timeout)
    results = defaultdict((lambda : POLL_NULL))
    for p in [(r, POLL_IN), (w, POLL_OUT), (x, POLL_ERR)]:
        for fd in p[0]:
            results[fd] |= p[1]
    return results.items()

dataset/ETHPy150Open ziggear/shadowsocks/shadowsocks/eventloop.py SelectLoop.poll/original