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

Method _iterator

src/anthropic/_decoders/jsonl.py:38–41  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

36
37 @cached_property
38 def _iterator(self) -> Iterator[_T]:
39 # On a copy, as a generator that referred to this decoder would form a cycle with it, which would leave it to
40 # the garbage collector to free a dropped decoder. Made on first use to copy what a subclass sets in `__init__`.
41 return copy(self).__decode__()
42
43 def close(self) -> None:
44 """Close the response body stream.

Callers

nothing calls this directly

Calls 1

__decode__Method · 0.45

Tested by

no test coverage detected