gh-119057: Use better error messages for zero division#119066
Merged
sobolevn merged 4 commits intopython:mainfrom Jun 3, 2024
Merged
gh-119057: Use better error messages for zero division#119066sobolevn merged 4 commits intopython:mainfrom
sobolevn merged 4 commits intopython:mainfrom
Conversation
mdickinson
reviewed
May 15, 2024
Member
mdickinson
left a comment
There was a problem hiding this comment.
The code changes look fine to me in principle. I think there's still some wrangling to do over the exact error messages we want - we need to resolve that on the issue.
x // 0
mdickinson
approved these changes
Jun 3, 2024
Member
mdickinson
left a comment
There was a problem hiding this comment.
LGTM - thank you! I searched for missing cases of both ZeroDivisionError and PyExc_ZeroDivisionError and didn't find any.
I'm a little horrified at how often we use ZeroDivisionError in random tests that have nothing to do with arithmetic, but that's another story ...
Member
Author
|
Thanks a lot for the help and review! 👍 I will open a new issue about |
mliezun
pushed a commit
to mliezun/cpython
that referenced
this pull request
Jun 3, 2024
barneygale
pushed a commit
to barneygale/cpython
that referenced
this pull request
Jun 5, 2024
noahbkim
pushed a commit
to hudson-trading/cpython
that referenced
this pull request
Jul 11, 2024
estyxx
pushed a commit
to estyxx/cpython
that referenced
this pull request
Jul 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now these two errors are very similar:
Better wording is always welcome!
📚 Documentation preview 📚: https://cpython-previews--119066.org.readthedocs.build/