Skip to content

Commit

Permalink
README: rephrase call
Browse files Browse the repository at this point in the history
  • Loading branch information
ebonnal committed Oct 16, 2024
1 parent a1d6319 commit 259dfc0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,10 @@ Please help us ! Feel very welcome to:
>>> assert integers.count() == 10
```

> ***calling*** the stream iterates over it until exhaustion.
> ***calling*** the stream iterates over it until exhaustion and returns it.
```python
>>> integers.foreach(print)()
>>> verbose_integers: Stream[int] = integers.foreach(print)
>>> assert verbose_integers() is verbose_integers
0
1
2
Expand Down
4 changes: 4 additions & 0 deletions tests/test_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ def test_zip_example(self) -> None:
def test_count_example(self):
assert integers.count() == 10

def test_call(self):
verbose_integers: Stream[int] = integers.foreach(print)
assert verbose_integers() is verbose_integers

# fmt: off
def test_etl_example(self) -> None: # pragma: no cover
# for mypy typing check only
Expand Down

0 comments on commit 259dfc0

Please sign in to comment.