Skip to content
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

Add PyLong_IsPositive/Zero/Negative() functions #126061

Closed
skirpichev opened this issue Oct 28, 2024 · 3 comments
Closed

Add PyLong_IsPositive/Zero/Negative() functions #126061

skirpichev opened this issue Oct 28, 2024 · 3 comments
Labels
topic-C-API type-feature A feature request or enhancement

Comments

@skirpichev
Copy link
Member

skirpichev commented Oct 28, 2024

as alternative API to PyLong_GetSign().

It seems, C-API WG is positive on this, see capi-workgroup/decisions#29. This issue will track implementation.

Linked PRs

@skirpichev skirpichev added type-feature A feature request or enhancement topic-C-API labels Oct 28, 2024
@rruuaanng
Copy link
Contributor

If possible, could you give it to me?

@skirpichev
Copy link
Member Author

In principle, I've patch ready. But please do! Only set pr as draft until C-API WG issue is open.

@rruuaanng
Copy link
Contributor

Oh thank you, Sergey!

@skirpichev skirpichev changed the title Add PyLong_IsPositive(), PyLong_IsNegative() and PyLong_IsZero() Add PyLong_IsPositive/Zero/Negative() functions Oct 28, 2024
vstinner pushed a commit that referenced this issue Nov 12, 2024
Co-authored-by: Sergey B Kirpichev <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
picnixz added a commit to picnixz/cpython that referenced this issue Dec 8, 2024
…hon#126065)

Co-authored-by: Sergey B Kirpichev <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
picnixz pushed a commit to picnixz/cpython that referenced this issue Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-C-API type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants