Skip to content

Commit aa790a6

Browse files
Fixes Pattern Matching example from Result docs (#1468)
1 parent 9f07001 commit aa790a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_examples/test_result/test_result_pattern_matching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def div(first_number: int, second_number: int) -> int:
1616
print('Result is "{0}"'.format(value))
1717

1818
# Matches if the result stored inside `Failure` is `ZeroDivisionError`
19-
case Failure(ZeroDivisionError):
19+
case Failure(ZeroDivisionError()):
2020
print('"ZeroDivisionError" was raised')
2121

2222
# Matches any `Failure` instance

0 commit comments

Comments
 (0)