-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PEP 757: edits, based on C-API WG feedback #4026
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.
Thanks @skirpichev.
Co-authored-by: Carol Willing <[email protected]>
PEP updated to roughly follow @encukou proposal in the d.p.o thread. Accompanying change in the implementation: vstinner/cpython#7 (this uses anonymous union for now). Just one export "view" kept: a digit array, valid for all integers for now. The export benchmark should be unaffected. PS: It would be nice if we could put an upper bound on size of integers in the |
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.
Please address feedback related to "big enough" integers.
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 @skipichev. I really like the latest commit from you. The concepts are now much more understandable. Great job.
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.
As the PEP co-author, I'm against removing PyLongExport.value
member.
Ok, Victor, but please listen first to my arguments.
|
@skirpichev You've already said so a number of times on Discourse, how is it useful to rehash it here? You're not the only potential consumer for this API, and you're also not a CPython maintainer AFAIK. |
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 clarification about using PyLongWriter_Discard.
Now changes in the PyLongExport struct and PyLong_Export API (return type) - reverted. |
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, but I cannot merge your PR since it's a draft.
FYI export_long
name is needed in the implementation because export
is a reserved keyword in C++ (I don't recall in which C++ version, maybe C++20). But for the PEP, we can use export
name.
Co-authored-by: Carol Willing <[email protected]>
PEP 123: Summary of changes
)// capi-workgroup/decisions#45
📚 Documentation preview 📚: https://pep-previews--4026.org.readthedocs.build/