结论 因此,当你遇到 'async_generator' object is not an iterator 的错误时,这意味着你试图将异步生成器用于需要同步迭代器的场景。为了解决这个问题,你需要检查你的代码逻辑,确保在需要异步操作的场景中使用异步生成器,而在需要同步迭代器的场景中使用传统的迭代器或生成器。
问块async_generatorEN这在Python3.6中的函数中稍微复杂一些(一旦正确地从__aiter__返回一个awaitable...
V0217: AsyncGenerator objects are not supported The specification states: 25.5 AsyncGenerator Objects An AsyncGenerator object is an instance of an async generator function and conforms to both the AsyncIterator and AsyncIterable interfaces. AsyncGenerator instances directly inherit properties from the o...
babel-parser #11148 Allow await when it is not in AsyncArrowHead (@arku) babel-helpers, babel-plugin-proposal-object-rest-spread, babel-runtime-corejs2, babel-runtime #9794 fix(rest-spread): Do not require Symbol.iterator for strings (@clshortfuse) babel-generator #11255 Fix printing ...
SyncAsync function T Promise function* Iterator ObservableAn Observable accepts a generator and pushes it 0...N values and optionally terminates by either pushing an error or a return value. The consumer can also short-circuit by calling return() on the Generator object returned from the ...
V0217: AsyncGenerator objects are not supported The specification states: 25.5 AsyncGenerator Objects An AsyncGenerator object is an instance of an async generator function and conforms to both the AsyncIterator and AsyncIterable interfaces. AsyncGenerator instances directly inherit properties from the...