-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
gh-99619: fix error in documentation of ExceptionGroup.derive() #99621
Conversation
Doc/library/exceptions.rst
Outdated
... | ||
>>> match, rest = exc.split(ValueError) | ||
>>> exc, exc.__context__, exc.__cause__, exc.__notes__, id(exc.__traceback__) | ||
(MyGroup('eg', [ValueError(1), TypeError(2)]), Exception('context'), Exception('cause'), ['a note'], 4395554432) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like including the id()
, since ideally we'd run these examples as doctests and obviously the id()
isn't gong to stay the same. Maybe instead have a line assert exc.__traceback__ is match.__traceback__ is rest.__traceback__
?
Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
…pythonGH-99621) (cherry picked from commit 5d9183c) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
GH-99720 is a backport of this pull request to the 3.11 branch. |
Fixes #99619.