MCPcopy
hub / github.com/anthropics/anthropic-sdk-python / iter_next

Function iter_next

tests/test_streaming.py:254–258  ·  view source on GitHub ↗
(iter: Iterator[_T] | AsyncIterator[_T])

Source from the content-addressed store, hash-verified

252 yield chunk
253
254
255async def iter_next(iter: Iterator[_T] | AsyncIterator[_T]) -> _T:
256 if isinstance(iter, AsyncIterator):
257 return await iter.__anext__()
258
259 return next(iter)
260
261

Calls 1

__anext__Method · 0.45

Tested by

no test coverage detected