-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-94673: Ensure subtypes are readied only once in math.trunc() #105465
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # 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. |
GH-105471 is a backport of this pull request to the 3.12 branch. |
…pythongh-105465) Fixes a typo in d2e2e53. (cherry picked from commit 5394bf9) Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
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