Skip to content

Commit c47d63a

Browse files
authored
Merge pull request #43 from PickwickSoft/bugfix/fix-error-in-readme
Update README.md
2 parents 710cc68 + 799162d commit c47d63a

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,12 @@ This is how you can use them:
116116
```python
117117
from pystreamapi import Stream, ErrorLevel
118118

119-
Stream.of([" ", '3', None, "2", 1, ""])
120-
.error_level(ErrorLevel.IGNORE)
121-
.map_to_int()
122-
.sorted()
123-
.for_each(print) # Output: 1 2 3
119+
Stream.of([" ", '3', None, "2", 1, ""]) \
120+
.error_level(ErrorLevel.IGNORE) \
121+
.map_to_int() \
122+
.error_level(ErrorLevel.RAISE) \
123+
.sorted() \
124+
.for_each(print) # Output: 1 2 3
124125
```
125126

126127
The code above will ignore all errors that occur during mapping to int and will just skip the elements.

0 commit comments

Comments
 (0)