| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Elaborate mutability in _PyBytes_Resize() and PyBytesWriter documentation. Check _PyBytes_IsMutable() in functions which require a mutable bytes object like PyBytesWriter_Resize().
|
I also wanted to add these assertions: assert(_PyObject_IsUniquelyReferenced(v));
assert(get_ob_shash((PyBytesObject*)v) == -1);
But IMO these checks are too strict and can fail in use cases which work currently. The PyBytesWriter has this warning:
But there is no check at runtime, even in debug mode. |
Sorry, something went wrong.
Documentation build overview2 files changed ± c-api/bytes.html ± whatsnew/changelog.html |
Sorry, something went wrong.
Elaborate on mutability in _PyBytes_Resize() and PyBytesWriter documentation. Check _PyBytes_IsMutable() in functions which require a mutable bytes object like PyBytesWriter_Resize().
| Back | FazBrowse Home | New Git URL |
Elaborate mutability in _PyBytes_Resize() and PyBytesWriter documentation.
Check _PyBytes_IsMutable() in functions which require a mutable bytes object like PyBytesWriter_Resize().