Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-43475: Fix the Python implementation of hash of Decimal NaN#26679

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
serhiy-storchaka merged 1 commit intopython:mainfromserhiy-storchaka:hash-nan
Jun 12, 2021

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedJun 11, 2021
edited by bedevere-bot
Loading

self.assertEqual(hashit(value),hashit(int(value)))

#the same hash that to an int
self.assertEqual(hashit(Decimal(23)),hashit(23))
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Covered by tests above.

Comment on lines -1822 to -1823
self.assertTrue(hashit(Decimal('Inf')))
self.assertTrue(hashit(Decimal('-Inf')))
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Covered by tests below.


#the same hash that to an int
self.assertEqual(hashit(Decimal(23)),hashit(23))
self.assertRaises(TypeError,hash,Decimal('sNaN'))
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Moved totest_hash_method_nan.

Copy link
Member

@mdickinsonmdickinson left a comment

Choose a reason for hiding this comment

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

LGTM

@miss-islington
Copy link
Contributor

Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-26706 is a backport of this pull request to the3.10 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.10only security fixes labelJun 13, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJun 13, 2021
…onGH-26679)(cherry picked from commit9f1c5f6)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington added a commit that referenced this pull requestJun 13, 2021
…6679)(cherry picked from commit9f1c5f6)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
jdevries3133 pushed a commit to jdevries3133/cpython that referenced this pull requestJun 19, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@rhettingerrhettingerAwaiting requested review from rhettinger

1 more reviewer

@mdickinsonmdickinsonmdickinson approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

skip newstype-bugAn unexpected behavior, bug, or error

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@serhiy-storchaka@miss-islington@bedevere-bot@mdickinson@the-knights-who-say-ni

[8]ページ先頭

©2009-2025 Movatter.jp