-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
gh-94673: Ensure subtypes are readied only once in math.trunc() #105465
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(good catch!)
Thanks @neonene for the PR, and @ericsnowcurrently for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
…pythongh-105465) Fixes a typo in d2e2e53. (cherry picked from commit 5394bf9) Co-authored-by: neonene <[email protected]>
gh-105465) (gh-105471) Fixes a typo in d2e2e53. (cherry picked from commit 5394bf9) Co-authored-by: neonene <[email protected]>
Out of curiosity, why is the code for |
Hmm, I have a guess. That code was added in 2007 (commit 15d3d04) as a builtin (bltinsmodule.c). In 2008 the function was moved to the math module. So that's probably the difference. |
@ericsnowcurrently Nice find; that would make sense. (Well, maybe; I still can't quite figure out why the Do you see any reason not to just get rid of this code in |
I suspect that code is an artifact of a time when folks were inconsistent about calling |
Fixes a typo in d2e2e53.
cc: @ericsnowcurrently