@@ -117,6 +117,31 @@ const DIAGRAM_7_B =
117
117
'┃ count() │ │ │ │ ✓ ┃\n' +
118
118
'┗━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━━━┛\n' ;
119
119
120
+ const DIAGRAM_8_A =
121
+ 'BaseException\n' +
122
+ ' +-- SystemExit' ;
123
+
124
+ const DIAGRAM_8_B =
125
+ "BaseException\n" +
126
+ " ├── SystemExit <span class='hljs-comment'># Raised by the sys.exit() function.</span>\n" +
127
+ " ├── KeyboardInterrupt <span class='hljs-comment'># Raised when the user hits the interrupt key.</span>\n" +
128
+ " └── Exception <span class='hljs-comment'># User-defined exceptions should be derived from this class.</span>\n" +
129
+ " ├── StopIteration <span class='hljs-comment'># Raised by next() when run on an empty iterator.</span>\n" +
130
+ " ├── ArithmeticError <span class='hljs-comment'># Base class for arithmetic errors.</span>\n" +
131
+ " │ └── ZeroDivisionError <span class='hljs-comment'># Raised when dividing by zero.</span>\n" +
132
+ " ├── AttributeError <span class='hljs-comment'># Raised when an attribute is missing.</span>\n" +
133
+ " ├── EOFError <span class='hljs-comment'># Raised by input() when it hits end-of-file condition.</span>\n" +
134
+ " ├── LookupError <span class='hljs-comment'># Raised when a look-up on sequence or dict fails.</span>\n" +
135
+ " │ ├── IndexError <span class='hljs-comment'># Raised when a sequence index is out of range.</span>\n" +
136
+ " │ └── KeyError <span class='hljs-comment'># Raised when a dictionary key is not found.</span>\n" +
137
+ " ├── NameError <span class='hljs-comment'># Raised when a variable name is not found.</span>\n" +
138
+ " ├── OSError <span class='hljs-comment'># Failures such as “file not found” or “disk full”.</span>\n" +
139
+ " │ └── FileNotFoundError <span class='hljs-comment'># When a file or directory is requested but doesn't exist.</span>\n" +
140
+ " ├── RuntimeError <span class='hljs-comment'># Raised by errors that don't fall in other categories.</span>\n" +
141
+ " │ └── RecursionError <span class='hljs-comment'># Raised when the the maximum recursion depth is exceeded.</span>\n" +
142
+ " ├── TypeError <span class='hljs-comment'># Raised when an argument is of wrong type.</span>\n" +
143
+ " └── ValueError <span class='hljs-comment'># When an argument is of right type but inappropriate value.</span>\n" +
144
+ " └── UnicodeError <span class='hljs-comment'># Raised when encoding/decoding strings from/to bytes fails.</span>\n" ;
120
145
121
146
// isFontAvailable:
122
147
( 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')) {
129
154
$ ( `code:contains(${ DIAGRAM_5_A } )` ) . html ( DIAGRAM_5_B ) ;
130
155
$ ( `code:contains(${ DIAGRAM_6_A } )` ) . html ( DIAGRAM_6_B ) ;
131
156
$ ( `code:contains(${ DIAGRAM_7_A } )` ) . html ( DIAGRAM_7_B ) ;
157
+ $ ( `code:contains(${ DIAGRAM_8_A } )` ) . html ( DIAGRAM_8_B ) ;
132
158
}
133
159
134
160
var isMobile = false ;
0 commit comments