diff --git a/web/script_2.js b/web/script_2.js index 7cd4252..d0d185e 100644 --- a/web/script_2.js +++ b/web/script_2.js @@ -117,6 +117,31 @@ const DIAGRAM_7_B = '┃ count() │ │ │ │ ✓ ┃\n' + '┗━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━┛\n'; +const DIAGRAM_8_A = + 'BaseException\n' + + ' +-- SystemExit'; + +const DIAGRAM_8_B = + "BaseException\n" + + " ├── SystemExit # Raised by the sys.exit() function.\n" + + " ├── KeyboardInterrupt # Raised when the user hits the interrupt key.\n" + + " └── Exception # User-defined exceptions should be derived from this class.\n" + + " ├── StopIteration # Raised by next() when run on an empty iterator.\n" + + " ├── ArithmeticError # Base class for arithmetic errors.\n" + + " │ └── ZeroDivisionError # Raised when dividing by zero.\n" + + " ├── AttributeError # Raised when an attribute is missing.\n" + + " ├── EOFError # Raised by input() when it hits end-of-file condition.\n" + + " ├── LookupError # Raised when a look-up on sequence or dict fails.\n" + + " │ ├── IndexError # Raised when a sequence index is out of range.\n" + + " │ └── KeyError # Raised when a dictionary key is not found.\n" + + " ├── NameError # Raised when a variable name is not found.\n" + + " ├── OSError # Failures such as “file not found” or “disk full”.\n" + + " │ └── FileNotFoundError # When a file or directory is requested but doesn't exist.\n" + + " ├── RuntimeError # Raised by errors that don't fall in other categories.\n" + + " │ └── RecursionError # Raised when the the maximum recursion depth is exceeded.\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"; // isFontAvailable: (function(d){function c(c){b.style.fontFamily=c;e.appendChild(b);f=b.clientWidth;e.removeChild(b);return f}var f,e=d.body,b=d.createElement("span");b.innerHTML=Array(100).join("wi");b.style.cssText=["position:absolute","width:auto","font-size:128px","left:-99999px"].join(" !important;");var g=c("monospace"),h=c("serif"),k=c("sans-serif");window.isFontAvailable=function(b){return g!==c(b+",monospace")||k!==c(b+",sans-serif")||h!==c(b+",serif")}})(document); @@ -129,6 +154,7 @@ if (isFontAvailable('Menlo')) { $(`code:contains(${DIAGRAM_5_A})`).html(DIAGRAM_5_B); $(`code:contains(${DIAGRAM_6_A})`).html(DIAGRAM_6_B); $(`code:contains(${DIAGRAM_7_A})`).html(DIAGRAM_7_B); + $(`code:contains(${DIAGRAM_8_A})`).html(DIAGRAM_8_B); } var isMobile = false;