def pop(self) -> Any: """Pop the next item from current batch. If current batch is empty/depleted, an exception is raised. You must call :func:`arango.cursor.Cursor.fetch` to manually fetch the next batch from server. :return: Next item in current batch. :raise arango.exceptions.CursorEmptyError: If current batch is empty. """ if len(self._batch) == 0: raise CursorEmptyError("current batch is empty") return self._batch.popleft()
def pop(self): """Pop the next item from current batch. If current batch is empty/depleted, an exception is raised. You must call :func:`arango.cursor.Cursor.fetch` to manually fetch the next batch from server. :return: Next item in current batch. :rtype: str | unicode | bool | int | list | dict :raise arango.exceptions.CursorEmptyError: If current batch is empty. """ if len(self._batch) == 0: raise CursorEmptyError('current batch is empty') return self._batch.popleft()