Sorry, something went wrong.
| inside an exception handler or :keyword:`finally` section. Exception chaining | ||
| can be disabled by using ``from None`` idiom: | ||
| Exception chaining happens automatically when an exception is raised inside an | ||
| exception handler or :keyword:`finally` section. Exception chaining can be |
There was a problem hiding this comment.
What do you think of adding: an exception handler (an :keyboard:`except` block)
Sorry, something went wrong.
There was a problem hiding this comment.
Or possibly a :keyboard: `try` block's exception handler
Sorry, something went wrong.
There was a problem hiding this comment.
I used a parenthetical on purpose to signify that «exception handler» == «except block» (I wrote try block by mistaked at first).
Otherwise it could be confusing what an exception handler is (is it a function you call in except? is it excepthook?)
Sorry, something went wrong.
There was a problem hiding this comment.
We already use :keyword:`finally` section.
How about just :keyword:`except` or :keyword:`finally` section for consistency?
Sorry, something went wrong.
|
Thanks @methane for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9. |
Sorry, something went wrong.
|
GH-23173 is a backport of this pull request to the 3.9 branch. |
Sorry, something went wrong.
Ref: bpo-42179
https://bugs.python.org/issue37826