-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
gh-135763: Argument Clinic: Implement allow_negative for ssize_t #138150
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
Changes from 1 commit
31863c4
a317020
56851ae
38a1a75
0e2d398
9c17e38
251eea1
77d625e
64aa681
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Add ``allow_negative`` flag to ``Py_ssize_t`` Argument Clinic converter, to | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AC is unfortunately an internal tool so I don't think we should document it. However, what could be interesting is whether we want to expose a new parsing character for positive
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There are already entries regarding arg clinic in the changelog 1, therefore I think it's plausible to keep the entry. I moved it to tools/demos however - should be a better fit.
I wonder why not providing a format unit for conversion to
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree no NEWS entry is needed, but @wiomoc could create a PR for the devguide after this is merged, which is where we document AC.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Because we use ssize_t for most internal sizes in Python as we need to indicate when a conversion failed with value = -1 && PyErr_Occurred() (I think).
Unfortunately, internally, most structures use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the explanation. Now I can make sense of it. I'll create an issue for adding |
||
| enable generation of bound checking | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.