{{ message }}
gh-94808: Cover handling non-finite numbers from round when ndigits is provided#94860
Merged
brandtbucher merged 1 commit intoJul 14, 2022
Merged
Conversation
brandtbucher
approved these changes
Jul 14, 2022
brandtbucher
left a comment
Member
There was a problem hiding this comment.
Interesting indeed!
Sorry, something went wrong.
Contributor
|
Thanks @mdboom for the PR, and @brandtbucher for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, something went wrong.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jul 15, 2022
…gits is provided (pythonGH-94860) (cherry picked from commit 625ba9b) Co-authored-by: Michael Droettboom <mdboom@gmail.com>
miss-islington
added a commit
that referenced
this pull request
Jul 15, 2022
Contributor
|
Thanks @mdboom for the PR, and @brandtbucher for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, something went wrong.
Contributor
|
Sorry, @mdboom and @brandtbucher, I could not cleanly backport this to |
Sorry, something went wrong.
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
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.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.
This is an interesting corner case.
By default
roundreturnsintwhich can't represent non-finite numbers, so it throws various exceptions.When
ndigitsis provided,roundreturnsfloat, so non-finite numbers can be represented, and they just return what was passed in.Automerge-Triggered-By: GH:brandtbucher