-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
gh-116560: Add PyLong_GetSign() public function #116561
Conversation
* rename _PyLong_Sign() to PyLong_Sign() * add argument checking, documentation and tests * keep _PyLong_Sign() as an alias to PyLong_Sign()
Misc/NEWS.d/next/C API/2024-03-10-14-55-51.gh-issue-116560.x2mZaO.rst
Outdated
Show resolved
Hide resolved
I created capi-workgroup/decisions#19 for this API. |
The SC decided to adopt this API: capi-workgroup/decisions#19 (comment) @skirpichev: Would you mind to update your PR for this API? |
@vstinner, I think it's already in sync with that version. Sphinx docs use slightly different wording. Let me know if you prefer variant from capi-workgroup/decisions#19 (comment). |
Well, the C API WG prefers the name |
Co-authored-by: Victor Stinner <[email protected]>
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.
Thanks for the update. The overall change LGTM, but I have some more comments.
Co-authored-by: Victor Stinner <[email protected]>
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 if you modify the doc as suggested :-)
Co-authored-by: Sergey B Kirpichev <[email protected]>
Thanks for review and patience:) |
Head branch was pushed to by a user without write access
Merged, thanks. |
Function added to pythoncapi-compat: python/pythoncapi-compat@18d1df7 |
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
PyLong_Sign()
now is a wrapper to_PyLong_Sign()
: argument checking added, also documentation and testsNotes: Some
PyLong_As*
functions fallback to__index__()
call, some not. C.f.PyLong_AsLong()
vsPyLong_AsSsize_t()
. Not sure if this is not a bug, but second was chosen.📚 Documentation preview 📚: https://cpython-previews--116561.org.readthedocs.build/