def dataReceived(self, data):
        self._buf.write(data)

        while 1: # need to be able to retry immediately when handlers change
            try:
                while self._toread >= len(self._buf):
                    self._toread = self._handler.send(self._buf)
                break           # no data, no retry
            except StopIteration:
                if self._handler_changed:
                    self._handler_changed = False
                else:
                    self._toread = None
                    self._handler = None
                    break
            except:
                # undocumented, but real; this way we can signal
                # protocol errors directly, and by not passing/raising
                # directly we avoid a stack trace log, with the same
                # effect - connectionLost
                f = failure.Failure()
                log.info(f.value, exc_info=log.isEnabledFor(logging.DEBUG))
                return f
dataset/ETHPy150Open arkadini/twimp/twimp/utils.py/GeneratorWrapperProtocol.dataReceived/swapped operands of `>=`