Update `ExceptionGroup`s to use a tuple of errors where possible
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Documentation
Now that #141736 has been merged, the repr() of ExceptionGroups is slightly more efficient when a tuple is used as the exceptions sequence. Lists are fine, just not as optimal when the sequence of exceptions is already known/constant.
The docs should be updated to use tuples of exception sequences where reasonable to encourage 'best practice'.
Linked PRs
- gh-142393
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the documentation examples that construct ExceptionGroups, using the change from #141736 as context for why tuples are preferred. Compare the proposed updates in linked PR #142393 and check that each changed example uses a tuple only where the exception sequence is already known or constant.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100