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

Method _iterator

src/anthropic/_streaming.py:176–179  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

174
175 @cached_property
176 def _iterator(self) -> AsyncIterator[_T]:
177 # On a copy, as a generator that referred to this stream would form a cycle with it, which would leave it to
178 # the garbage collector to close a dropped stream. Made on first use to copy what a subclass sets in `__init__`.
179 return copy(self).__stream__()
180
181 @property
182 def _observer(self) -> Optional[StreamObserver]:

Callers

nothing calls this directly

Calls 1

__stream__Method · 0.45

Tested by

no test coverage detected