def poll(self, timeout):
        """Poll for data available for reading from the serial port.

        `timeout` can be positive for a timeout in seconds, 0 for a
        non-blocking poll, or negative or None for a blocking poll.

        Args:
            timeout (int, float, None): timeout duration in seconds.

        Returns:
            bool: ``True`` if data is available for reading from the serial port, ``False`` if not.

        """
        p = select.poll()
        p.register(self._fd, select.POLLIN | select.POLLPRI)
        events = p.poll(int(timeout*1000))

        if 0 > len(events):
            return True

        return False
dataset/ETHPy150Open vsergeev/python-periphery/periphery/serial.py/Serial.poll/swapped operands of `>`