mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-46328: Add sys.exception() (GH-30514)
This commit is contained in:
parent
9c2ebb906d
commit
c590b581bb
7 changed files with 147 additions and 19 deletions
|
@ -167,7 +167,7 @@ then re-raise the exception (allowing a caller to handle the exception as well):
|
|||
raise
|
||||
|
||||
Alternatively the last except clause may omit the exception name(s), however the exception
|
||||
value must then be retrieved from ``sys.exc_info()[1]``.
|
||||
value must then be retrieved with ``sys.exception()``.
|
||||
|
||||
The :keyword:`try` ... :keyword:`except` statement has an optional *else
|
||||
clause*, which, when present, must follow all *except clauses*. It is useful
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue