From 026a976f5adb91541c00e72abd9814fc47f67b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Wed, 11 Mar 2020 12:40:03 +0100 Subject: [PATCH] Exceptions --- README.md | 4 ++-- index.html | 4 ++-- web/script_2.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 085d8d6..636f6ef 100644 --- a/README.md +++ b/README.md @@ -1337,7 +1337,7 @@ from functools import partial LogicOp = Enum('LogicOp', {'AND': partial(lambda l, r: l and r), 'OR' : partial(lambda l, r: l or r)}) ``` -* **Another solution in this particular case is to use built-in functions `'and_'` and `'or_'` from the module [operator](#operator).** +* **Another solution in this particular case is to use built-in functions and\_() and or\_() from the module [operator](#operator).** Exceptions @@ -1420,7 +1420,7 @@ BaseException +-- StopIteration # Raised by next() when run on an empty iterator. +-- TypeError # Raised when an argument is of wrong type. +-- ValueError # When an argument is of right type but inappropriate value. - +-- UnicodeError # Raised when encoding/decoding strings from/to bytes fails. + +-- UnicodeError # Raised when encoding/decoding strings to/from bytes fails. ``` #### Collections and their exceptions: diff --git a/index.html b/index.html index 09e8692..d4e4b11 100644 --- a/index.html +++ b/index.html @@ -1266,7 +1266,7 @@ LogicOp = Enum('LogicOp', {'and_' and 'or_' from the module operator. +
  • Another solution in this particular case is to use built-in functions and_() and or_() from the module operator.
  • #Exceptions

    Basic Example

    try:
         <code>
    @@ -1334,7 +1334,7 @@ error_msg = traceback.format_exception(exc_type, <name>, <name>.__tr
           +-- StopIteration           # Raised by next() when run on an empty iterator.
           +-- TypeError               # Raised when an argument is of wrong type.
           +-- ValueError              # When an argument is of right type but inappropriate value.
    -           +-- UnicodeError       # Raised when encoding/decoding strings from/to bytes fails.
    +           +-- UnicodeError       # Raised when encoding/decoding strings to/from bytes fails.
     

    Collections and their exceptions:

    +-----------+------------+------------+------------+
    diff --git a/web/script_2.js b/web/script_2.js
    index 3ffc203..00aeabd 100644
    --- a/web/script_2.js
    +++ b/web/script_2.js
    @@ -183,7 +183,7 @@ const DIAGRAM_8_B =
       "      ├── StopIteration           # Raised by next() when run on an empty iterator.\n" +
       "      ├── TypeError               # Raised when an argument is of wrong type.\n" +
       "      └── ValueError              # When an argument is of right type but inappropriate value.\n" +
    -  "           └── UnicodeError       # Raised when encoding/decoding strings from/to bytes fails.\n";
    +  "           └── UnicodeError       # Raised when encoding/decoding strings to/from bytes fails.\n";
     
     const DIAGRAM_9_A =
       '+------------------+--------------+--------------+--------------+\n' +