gh-116560: Add PyLong_GetSign() public function#116561
gh-116560: Add PyLong_GetSign() public function#116561vstinner merged 18 commits intopython:mainfrom
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. |
Co-authored-by: Victor Stinner <vstinner@python.org>
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 <vstinner@python.org>
vstinner
left a comment
There was a problem hiding this comment.
Thanks for the update. The overall change LGTM, but I have some more comments.
Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner
left a comment
There was a problem hiding this comment.
LGTM if you modify the doc as suggested :-)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
|
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 <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
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/