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

Function iter_next

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

Source from the content-addressed store, hash-verified

362 yield chunk
363
364
365async def iter_next(iter: Iterator[_T] | AsyncIterator[_T]) -> _T:
366 if isinstance(iter, AsyncIterator):
367 return await iter.__anext__()
368
369 return next(iter)
370
371

Calls 1

__anext__Method · 0.45

Tested by

no test coverage detected