File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1371,8 +1371,8 @@ finally:
1371
1371
``` python
1372
1372
except < exception> :
1373
1373
except < exception> as < name> :
1374
- except (< exception> , ... ):
1375
- except (< exception> , ... ) as < name> :
1374
+ except (< exception> , [ ... ] ):
1375
+ except (< exception> , [ ... ] ) as < name> :
1376
1376
```
1377
1377
* ** Also catches subclasses of the exception.**
1378
1378
* ** Use ` 'traceback.print_exc()' ` to print the error message to stderr.**
Original file line number Diff line number Diff line change 1304
1304
</ ul >
1305
1305
< div > < h3 id ="catchingexceptions "> Catching Exceptions</ h3 > < pre > < code class ="python language-python hljs "> < span class ="hljs-keyword "> except</ span > <exception>:
1306
1306
< span class ="hljs-keyword "> except</ span > <exception> < span class ="hljs-keyword "> as</ span > <name>:
1307
- < span class ="hljs-keyword "> except</ span > (<exception>, ...):
1308
- < span class ="hljs-keyword "> except</ span > (<exception>, ...) < span class ="hljs-keyword "> as</ span > <name>:
1307
+ < span class ="hljs-keyword "> except</ span > (<exception>, [ ...] ):
1308
+ < span class ="hljs-keyword "> except</ span > (<exception>, [ ...] ) < span class ="hljs-keyword "> as</ span > <name>:
1309
1309
</ code > </ pre > </ div >
1310
1310
1311
1311
< ul >
You can’t perform that action at this time.
0 commit comments