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

Function iter_next

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

Source from the content-addressed store, hash-verified

434 yield chunk
435
436
437async def iter_next(iter: Iterator[_T] | AsyncIterator[_T]) -> _T:
438 if isinstance(iter, AsyncIterator):
439 return await iter.__anext__()
440
441 return next(iter)
442
443

Calls 1

__anext__Method · 0.45

Tested by

no test coverage detected