Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Feb 21, 2024

In the limited C API and the stable ABI, implement Py_None, Py_False and Py_True constants are symbols.

@vstinner
Copy link
Member Author

vstinner commented Feb 21, 2024

Two more constants to consider:

#define Py_Ellipsis (&_Py_EllipsisObject)
#define Py_NotImplemented (&_Py_NotImplementedStruct)

Update: I completed my PR to also cover these two constants.

@vstinner vstinner requested a review from a team as a code owner February 21, 2024 10:45
In the limited C API and the stable ABI, implement Py_None, Py_False,
Py_True, Py_Ellipsis and Py_NotImplemented constants are symbols.
@vstinner
Copy link
Member Author

Counter-proposition: #116572 implement these constants as function calls in the limited C API.

@vstinner
Copy link
Member Author

The C API Working Group chose to go with a function call instead: capi-workgroup/decisions#16

@vstinner vstinner closed this Mar 18, 2024
@vstinner vstinner deleted the export_constants branch March 18, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant