From a2e9060e210189b61410e62020d6670c5de80e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 30 Jun 2020 03:52:19 +0200 Subject: [PATCH] Exceptions --- README.md | 2 ++ index.html | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 07489d8..38662b1 100644 --- a/README.md +++ b/README.md @@ -1363,6 +1363,8 @@ else: finally: ``` +* **Code inside the `'else'` block will only be executed if `'try'` block had no exception.** +* **Code inside the `'finally'` block will always be executed.** ### Catching Exceptions ```python diff --git a/index.html b/index.html index 2e0ba4f..a26acad 100644 --- a/index.html +++ b/index.html @@ -1301,6 +1301,10 @@ LogicOp = Enum('LogicOp', {'else' block will only be executed if 'try' block had no exception. +
  • Code inside the 'finally' block will always be executed.
  • +

    Catching Exceptions

    except <exception>:
     except <exception> as <name>:
     except (<exception>, ...):