Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
gh-142392: UpdateExceptionGroups in docs to use a tuple of errors where possible#142393
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…ions instead of a static list
picnixz commentedDec 7, 2025
Was it discussed in the PR and deemed a better way alternative? I personally prefer using |
dr-carlos commentedDec 7, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It certainly isn't vastly superior, just slightly more efficient.@iritkatriel asked me to open an issue to update the docs, so I opened an issue and PR for it since there aren't many changes. When you run |
picnixz commentedDec 7, 2025
Yes it could be expensive but exception handlers are usually rare paths, so performance usually aren't an issue here. Unless you have a list of millions of exception objects, it doesn't really matter IMO. |
iritkatriel commentedDec 8, 2025
I agree it's not a significant perf impact. My point is it's inconsistent to recommend in the docs to use tuples and then have examples using []. |
Uh oh!
There was an error while loading.Please reload this page.
This should skip news. Thanks!
ExceptionGroups to use a tuple of errors where possible #142392📚 Documentation preview 📚:https://cpython-previews--142393.org.readthedocs.build/