-
Notifications
You must be signed in to change notification settings - Fork 6
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
Writer APIs for str and bytes should be public #70
Comments
@malemburg To make it easier to find this issue when searching for APIs, and to find the APIs you propose to make public, can you name the specific APIs please? |
I proposed a new PyUnicodeWriter API which was just approved by the C API WG: capi-workgroup/decisions#27 The |
Great. Would have been nice to ping me on this for comments, since I was not aware of your proposal.
This should be made public in the same way. |
I just created python/cpython#121710 [C API] Add PyBytesWriter API.
I wasn't aware of this issue. I found it after the decision was taken on PyUnicodeWriter. |
These are useful when creating larger strings or bytes arrays from C and hide away the details of the usual allocate/write/resize dance, which was the default way of doing things before we had the writer APIs (the str object still supports this via PyUnicode_Resize(), bytes do so as well, but only via the private _PyString_Resize()).
The text was updated successfully, but these errors were encountered: