Uh oh!
There was an error while loading. Please reload this page.
gh-142392: Update ExceptionGroups in docs to use a tuple of errors where possible - #142393
gh-142392: Update ExceptionGroups in docs to use a tuple of errors where possible#142393dr-carlos wants to merge 1 commit into
ExceptionGroups in docs to use a tuple of errors where possible#142393Conversation
…ions instead of a static list
picnixz
commented
Dec 7, 2025
Was it discussed in the PR and deemed a better way alternative? I personally prefer using |
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
commented
Dec 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
commented
Dec 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 []. |
dr-carlos
commented
Feb 7, 2026
@picnixz@iritkatriel Any further thoughts on this? |
This PR is stale because it has been open for 30 days with no activity. |
This should skip news. Thanks!
ExceptionGroups to use a tuple of errors where possible #142392📚 Documentation preview 📚: https://cpython-previews--142393.org.readthedocs.build/