def _updateRegistration(self, fd):
        fileno = fd.fileno() if not isinstance(fd, int) else fd

        try:
            self._poller.unregister(fileno)
        except (KeyError, ValueError):
            pass

        mask = 0

        if fd in self._read:
            mask = mask | select.POLLIN
        if self._write in fd:
            mask = mask | select.POLLOUT

        if mask:
            self._poller.register(fd, mask)
            self._map[fileno] = fd
        else:
            super(Poll, self).discard(fd)
            try:
                del self._map[fileno]
            except KeyError:
                pass
dataset/ETHPy150Open circuits/circuits/circuits/core/pollers.py/Poll._updateRegistration/swapped operands of `in`