Skip to content

gh-123811: test that round(Decimal) can return signed zero #124007

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

skirpichev
Copy link
Contributor

@skirpichev skirpichev commented Sep 12, 2024

@skirpichev
Copy link
Contributor Author

(Probably, can skip news.)

The round() sphinx docs have extensive set of examples. Maybe we should add yet one:

>>> round(-Decimal('3.75'), -1)
Decimal('-0E+1')

?

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@serhiy-storchaka serhiy-storchaka added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Sep 13, 2024
@serhiy-storchaka serhiy-storchaka merged commit b46c65e into python:main Sep 13, 2024
39 checks passed
@miss-islington-app
Copy link

Thanks @skirpichev for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 13, 2024
…honGH-124007)

(cherry picked from commit b46c65e)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Sep 13, 2024

GH-124048 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Sep 13, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 13, 2024
…honGH-124007)

(cherry picked from commit b46c65e)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Sep 13, 2024

GH-124049 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Sep 13, 2024
serhiy-storchaka pushed a commit that referenced this pull request Sep 13, 2024
…-124007) (GH-124049)

(cherry picked from commit b46c65e)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
@skirpichev skirpichev deleted the test-round-szero-dec-123811 branch September 13, 2024 13:09
Yhg1s pushed a commit that referenced this pull request Sep 24, 2024
…-124007) (#124048)

gh-123811: Test that round(Decimal) can return signed zero (GH-124007)
(cherry picked from commit b46c65e)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants