-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
bpo-43002: Fix description of behaviour of an exception class in 'from' clause #24303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-43002: Fix description of behaviour of an exception class in 'from' clause #24303
Conversation
This PR is stale because it has been open for 30 days with no activity. |
Thanks, but I'm not quite sure what to do with this information. Reviews are welcome. I'll plan to merge within the next couple of weeks. |
This PR is stale because it has been open for 30 days with no activity. |
Thanks @mdickinson for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
…ythonGH-24303) (cherry picked from commit 79650d0) Co-authored-by: Mark Dickinson <[email protected]>
GH-25341 is a backport of this pull request to the 3.9 branch. |
GH-25342 is a backport of this pull request to the 3.8 branch. |
…ythonGH-24303) (cherry picked from commit 79650d0) Co-authored-by: Mark Dickinson <[email protected]>
…H-24303) (GH-25342) (cherry picked from commit 79650d0) Co-authored-by: Mark Dickinson <[email protected]> Co-authored-by: Mark Dickinson <[email protected]>
…H-24303) (GH-25341) (cherry picked from commit 79650d0) Co-authored-by: Mark Dickinson <[email protected]> Co-authored-by: Mark Dickinson <[email protected]>
In a
raise <expr> from <expr2>
statement,<expr2>
is permitted to be an exception instance, an exception class, orNone
. The reference manual suggests that in the first two cases, the value of<expr2>
is attached directly to the raise exception as the__cause__
. But in the implementation, an exception class is first instantiated before being attached to the raised exception:cpython/Python/ceval.c
Lines 4758 to 4763 in b745a61
This PR fixes the documentation to match the implementation.
https://bugs.python.org/issue43002