Skip to content

Commit 7e2e84c

Browse files
committed
align stream's docstring with README
1 parent 815c2ac commit 7e2e84c

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

streamable/_stream.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
from streamable.visitors._repr import ReprVisitor
4444
from streamable.visitors._involves_async import InvolvesAsyncVisitor
4545

46-
# Initialize "streamable" logger
4746
setup_logger()
4847

4948
if TYPE_CHECKING: # pragma: no cover
@@ -66,9 +65,15 @@ class stream(Iterable[T], AsyncIterable[T], Awaitable["stream[T]"]):
6665
6766
Chain lazy operations, source elements are processed on-the-fly during iteration.
6867
69-
Operations accept both sync and async functions, they can be mixed within the same ``stream``, that can then be consumed as an ``Iterable`` or ``AsyncIterable``. Async functions run in the current loop, one is created if needed.
68+
A `stream` can be iterated several times if its source allows it.
7069
71-
Operations are implemented so that the iteration can resume after an exception.
70+
Operations return a new `stream`.
71+
72+
Operations allow iteration to resume after an exception.
73+
74+
Operations accept both sync and async functions.
75+
76+
A sync iteration over a stream involving async functions runs an async iteration under the hood, using the current event loop (or setting a new one if needed).
7277
7378
Args:
7479
source (``Iterable[T] | AsyncIterable[T] | Callable[[], T] | Callable[[], Coroutine[object, object, T]]``):

0 commit comments

Comments
 (0)