diff options
Diffstat (limited to 'docs/paths.md')
| -rw-r--r-- | docs/paths.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/paths.md b/docs/paths.md index cde7f74d..99891671 100644 --- a/docs/paths.md +++ b/docs/paths.md @@ -181,14 +181,14 @@ value if the file couldn't be read. **Example:** ```tomo # Safely handle file not being readable: -if lines := (./file.txt).by_line(): - for line in lines: +if lines := (./file.txt).by_line() + for line in lines say(line.upper()) -else: +else say("Couldn't read file!") # Assume the file is readable and error if that's not the case: -for line in (/dev/stdin).by_line()!: +for line in (/dev/stdin).by_line()! say(line.upper()) ``` |
