https://github.com/python/cpython/commit/8df6f077115484361b40952751fb7d703843c192
commit: 8df6f077115484361b40952751fb7d703843c192
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2026-09-16T12:13:54Z
summary:
gh-157242: Fix typo in _PyBytes_Resize() (#157619)
PyBytes_AsString() should be used to modify the object, not
PyBytesWriter_GetData().
files:
M Doc/c-api/bytes.rst
diff --git a/Doc/c-api/bytes.rst b/Doc/c-api/bytes.rst
index 72f4a2829d89c7..c03816b5727fa4 100644
--- a/Doc/c-api/bytes.rst
+++ b/Doc/c-api/bytes.rst
@@ -249,7 +249,7 @@ called with a non-bytes parameter.
While bytes objects are usually immutable in Python, this special C API
allows mutating a bytes object in-place. The returned bytes object can still
- be mutated using :c:func:`PyBytesWriter_GetData`; except if *newsize* is
+ be mutated using :c:func:`PyBytes_AsString`; except if *newsize* is
zero in which case it returns the immutable empty bytes string.
.. soft-deprecated:: 3.15
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]