GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — bpo-43475: Fix the Python implementation of hash of Decimal NaN by serhiy-storchaka · Pull Request #26679 · python/cpython Conversation
|
| self.assertEqual(hashit(value), hashit(int(value))) | ||
|
|
||
| #the same hash that to an int | ||
| self.assertEqual(hashit(Decimal(23)), hashit(23)) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Covered by tests above.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| self.assertTrue(hashit(Decimal('Inf'))) | ||
| self.assertTrue(hashit(Decimal('-Inf'))) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Covered by tests below.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| #the same hash that to an int | ||
| self.assertEqual(hashit(Decimal(23)), hashit(23)) | ||
| self.assertRaises(TypeError, hash, Decimal('sNaN')) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Moved to test_hash_method_nan.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-26706 is a backport of this pull request to the 3.10 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…onGH-26679) (cherry picked from commit 9f1c5f6) Co-authored-by: Serhiy Storchaka <[email protected]>
…6679) (cherry picked from commit 9f1c5f6) Co-authored-by: Serhiy Storchaka <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.