170 consumer protocol (sync iteration or async iteration + await).
171
172▶ `done` and `error` are safe read-only views of the terminal state
173 for iterators and other siblings that need to observe lifecycle
174 without reaching into the underlying fields.
· · ·
175 """
176
177▶ __slots__ = ("_deltas", "_done", "_error", "_final_set", "_final_value")
178
179 def __init__(self) -> None:
· · ·
183 self._final_set: bool = False
184 self._done: bool = False
185▶ self._error: BaseException | None = None
186
187 @property
· · ·
188 def done(self) -> bool:
189▶ """Whether the projection has finished (successfully or via error)."""
190 return self._done
191
· · ·
192 @property
193▶ def error(self) -> BaseException | None:
194 """The terminal error, if any."""
195 return self._error
+ 52 more matches in this file