Skip to content

Commit 799162d

Browse files
authored
Update README.md
1 parent 710cc68 commit 799162d

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)