-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Introduce BytesBuilder #181
Comments
I started writing some different implementations for a PoC (https://github.com/cklein/hpy/tree/cklein-stringbuilder), but maybe the people who started the project or have been contributing for a longer time have a clearer vision of how the API should look like. What would be the basic operations? |
Would it be worth it to add a 2-stage accumulator, like |
@TeamSpen210 That sounds like a cool optimization to have under the hood, although I wouldn't make it part of the API (not that you or CPython seemed to be suggesting that). |
note: the actual API to use for this is being discussed in #214 |
Need to discuss cpython |
#127 and #179 made it official that we can't create "half-ready" strings which are supposed to be filled after creation.
However, there are cases in which this is a legitimate use case and currently it is not supported by HPy. We should:
StringBuilder
, similar to the existingTupleBuilder
andListBuilder
HPyBytes_FromStringAndSize
to point the user to the right solution. Something like... please use StringBuilder instead
.The text was updated successfully, but these errors were encountered: