def __anext__(self):
try:
result = self.__next__()
if inspect.isawaitable(result):
result = await result
self.qrw._result_cache[-1] = result
return result
except StopAsyncIteration:
self.qrw._result_cache.pop()
self.qrw._ct -= 1
self._idx -= 1
raise
except StopIteration:
raise StopAsyncIteration
评论列表
文章目录