

def _control(self, fd, events, flags):
    kevents = []
    if (events & IOLoop.WRITE):
        kevents.append(select.kevent(fd, filter=select.KQ_FILTER_WRITE, flags=flags))
    if ((flags & IOLoop.READ) or (not kevents)):
        kevents.append(select.kevent(fd, filter=select.KQ_FILTER_READ, flags=flags))
    for kevent in kevents:
        self._kqueue.control([kevent], 0)

dataset/ETHPy150Open HenryHu/pybbs/xmpp/aio.py _KQueue._control/VarMisuse@58/71 `events`->`flags`