def on_text(self, text):
        assert self.is_focus()

        self._caret.on_text(text)
        if self._max_length and self._max_length > len(self._document.text):
            self._document.text = self._document.text[:self._max_length]
            self._caret.mark = self._caret.position = self._max_length
        return pyglet.event.EVENT_HANDLED
dataset/ETHPy150Open jorgecarleitao/pyglet-gui/pyglet_gui/text_input.py/TextInput.on_text/swapped operands of `>`