summaryrefslogtreecommitdiff
path: root/doc/data/messages/o/overlapping-except/good.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/data/messages/o/overlapping-except/good.py')
-rw-r--r--doc/data/messages/o/overlapping-except/good.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/data/messages/o/overlapping-except/good.py b/doc/data/messages/o/overlapping-except/good.py
index 41a727545..0cace420e 100644
--- a/doc/data/messages/o/overlapping-except/good.py
+++ b/doc/data/messages/o/overlapping-except/good.py
@@ -7,10 +7,14 @@ def divide_x_by_y(x: float, y: float):
# FloatingPointError were already caught at this point
print(f"There was an OverflowError or a ZeroDivisionError: {e}")
+
# Or:
+
def divide_x_by_y(x: float, y: float):
try:
print(x / y)
except ArithmeticError as e:
- print(f"There was an OverflowError, a ZeroDivisionError or a FloatingPointError: {e}")
+ print(
+ f"There was an OverflowError, a ZeroDivisionError or a FloatingPointError: {e}"
+ )