From 799162ddbc98972fe070902ddfe675707acc4836 Mon Sep 17 00:00:00 2001 From: Stefan Garlonta <70283087+garlontas@users.noreply.github.com> Date: Thu, 20 Jul 2023 17:00:21 +0200 Subject: [PATCH] Update README.md --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 080f286..c98a0ff 100644 --- a/README.md +++ b/README.md @@ -116,11 +116,12 @@ This is how you can use them: ```python from pystreamapi import Stream, ErrorLevel -Stream.of([" ", '3', None, "2", 1, ""]) -.error_level(ErrorLevel.IGNORE) -.map_to_int() -.sorted() -.for_each(print) # Output: 1 2 3 +Stream.of([" ", '3', None, "2", 1, ""]) \ + .error_level(ErrorLevel.IGNORE) \ + .map_to_int() \ + .error_level(ErrorLevel.RAISE) \ + .sorted() \ + .for_each(print) # Output: 1 2 3 ``` The code above will ignore all errors that occur during mapping to int and will just skip the elements.